work in progress to remove all warnings

This commit is contained in:
Tony Cannon
2019-10-27 15:50:54 -07:00
parent 10f8a19c8f
commit 4c3aa4e099

View 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;
}