work in progress to remove all warnings
This commit is contained in:
27
src/lib/ggpo/platform_windows.cpp
Normal file
27
src/lib/ggpo/platform_windows.cpp
Normal file
@@ -0,0 +1,27 @@
|
||||
/* -----------------------------------------------------------------------
|
||||
* GGPO.net (http://ggpo.net) - Copyright 2009 GroundStorm Studios, LLC.
|
||||
*
|
||||
* Use of this software is governed by the MIT license that can be found
|
||||
* in the LICENSE file.
|
||||
*/
|
||||
|
||||
#include "platform_windows.h"
|
||||
|
||||
int
|
||||
Platform::GetConfigInt(const char* name)
|
||||
{
|
||||
char buf[1024];
|
||||
if (GetEnvironmentVariable(name, buf, ARRAY_SIZE(buf)) == 0) {
|
||||
return 0;
|
||||
}
|
||||
return atoi(buf);
|
||||
}
|
||||
|
||||
bool Platform::GetConfigBool(const char* name)
|
||||
{
|
||||
char buf[1024];
|
||||
if (GetEnvironmentVariable(name, buf, ARRAY_SIZE(buf)) == 0) {
|
||||
return false;
|
||||
}
|
||||
return atoi(buf) != 0 || _stricmp(buf, "true") == 0;
|
||||
}
|
||||
Reference in New Issue
Block a user