Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
vkd3d
Manage
Activity
Members
Labels
Plan
Wiki
Bugzilla
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
wine
vkd3d
Commits
d6b1e62f
Commit
d6b1e62f
authored
1 year ago
by
Stefan Dösinger
Committed by
Alexandre Julliard
10 months ago
Browse files
Options
Downloads
Patches
Plain Diff
vkd3d: Add a win32 version of vkd3d_get_program_name.
parent
962096f1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!832
vkd3d: Add a win32 version of vkd3d_get_program_name.
Pipeline
#26180
skipped
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libs/vkd3d/utils.c
+24
-0
24 additions, 0 deletions
libs/vkd3d/utils.c
with
24 additions
and
0 deletions
libs/vkd3d/utils.c
+
24
−
0
View file @
d6b1e62f
...
...
@@ -901,6 +901,30 @@ bool vkd3d_get_program_name(char program_name[PATH_MAX])
return
true
;
}
#elif defined(WIN32)
bool
vkd3d_get_program_name
(
char
program_name
[
PATH_MAX
])
{
char
buffer
[
MAX_PATH
];
char
*
p
,
*
name
;
size_t
len
;
*
program_name
=
'\0'
;
len
=
GetModuleFileNameA
(
NULL
,
buffer
,
ARRAY_SIZE
(
buffer
));
if
(
!
(
len
&&
len
<
MAX_PATH
))
return
false
;
name
=
buffer
;
if
((
p
=
strrchr
(
name
,
'/'
)))
name
=
p
+
1
;
if
((
p
=
strrchr
(
name
,
'\\'
)))
name
=
p
+
1
;
len
=
strlen
(
name
)
+
1
;
memcpy
(
program_name
,
name
,
len
);
return
true
;
}
#else
bool
vkd3d_get_program_name
(
char
program_name
[
PATH_MAX
])
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment