Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
illuna-minetest
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
Illuna-Minetest
illuna-minetest
Commits
0118c111
Commit
0118c111
authored
10 years ago
by
kwolekr
Browse files
Options
Downloads
Patches
Plain Diff
Fix some MSVC-specific warnings and add debug path as an MSVC directory
parent
43f10227
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/jthread/win32/jsemaphore.cpp
+6
-8
6 additions, 8 deletions
src/jthread/win32/jsemaphore.cpp
src/mods.cpp
+1
-1
1 addition, 1 deletion
src/mods.cpp
src/porting.cpp
+5
-1
5 additions, 1 deletion
src/porting.cpp
with
12 additions
and
10 deletions
src/jthread/win32/jsemaphore.cpp
100755 → 100644
+
6
−
8
View file @
0118c111
...
...
@@ -81,9 +81,9 @@ typedef struct _SEMAPHORE_BASIC_INFORMATION {
/* Note: this will only work as long as jthread is directly linked to application */
/* it's gonna fail if someone tries to build jthread as dll */
static
_NtQuerySemaphore
NtQuerySemaphore
=
static
_NtQuerySemaphore
NtQuerySemaphore
=
(
_NtQuerySemaphore
)
GetProcAddress
GetProcAddress
(
GetModuleHandle
(
"ntdll.dll"
),
"NtQuerySemaphore"
);
int
JSemaphore
::
GetValue
()
{
...
...
@@ -91,16 +91,14 @@ int JSemaphore::GetValue() {
LONG
retval
;
assert
(
NtQuerySemaphore
);
retval
=
NtQuerySemaphore
(
m_hSemaphore
,
0
,
&
BasicInfo
,
sizeof
(
SEMAPHORE_BASIC_INFORMATION
),
NULL
);
if
(
retval
==
ERROR_SUCCESS
)
{
return
BasicInfo
.
CurrentCount
;
}
else
{
assert
(
"unable to read semaphore count"
==
0
);
}
assert
(
"unable to read semaphore count"
==
0
);
return
0
;
}
This diff is collapsed.
Click to expand it.
src/mods.cpp
+
1
−
1
View file @
0118c111
...
...
@@ -240,7 +240,7 @@ void ModConfiguration::addMods(std::vector<ModSpec> new_mods)
for
(
std
::
vector
<
ModSpec
>::
const_iterator
it
=
new_mods
.
begin
();
it
!=
new_mods
.
end
();
++
it
){
const
ModSpec
&
mod
=
*
it
;
if
(
mod
.
part_of_modpack
!=
want_from_modpack
)
if
(
mod
.
part_of_modpack
!=
(
bool
)
want_from_modpack
)
continue
;
if
(
existing_mods
.
count
(
mod
.
name
)
==
0
){
// GOOD CASE: completely new mod.
...
...
This diff is collapsed.
Click to expand it.
src/porting.cpp
+
5
−
1
View file @
0118c111
...
...
@@ -290,7 +290,11 @@ void pathRemoveFile(char *path, char delim)
bool
detectMSVCBuildDir
(
char
*
c_path
)
{
std
::
string
path
(
c_path
);
const
char
*
ends
[]
=
{
"bin
\\
Release"
,
"bin
\\
Build"
,
NULL
};
const
char
*
ends
[]
=
{
"bin
\\
Release"
,
"bin
\\
Debug"
,
"bin
\\
Build"
,
NULL
};
return
(
removeStringEnd
(
path
,
ends
)
!=
""
);
}
...
...
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