diff --git a/ISLE/define.cpp b/ISLE/define.cpp index f5751c6e..7f574a8c 100644 --- a/ISLE/define.cpp +++ b/ISLE/define.cpp @@ -3,8 +3,7 @@ Isle *g_isle = 0; int g_closed = 0; -const char *WNDCLASS_NAME = "Lego Island MainNoM App"; -const char *WINDOW_TITLE = "LEGO®"; +const char *WINDOW_TITLE = "LEGO®"; unsigned char g_mousedown = 0; unsigned char g_mousemoved = 0; diff --git a/ISLE/define.h b/ISLE/define.h index ffa97a68..b104f239 100644 --- a/ISLE/define.h +++ b/ISLE/define.h @@ -5,7 +5,7 @@ class Isle; extern Isle *g_isle; extern int g_closed; -extern const char *WNDCLASS_NAME; +#define WNDCLASS_NAME "Lego Island MainNoM App" extern const char *WINDOW_TITLE; extern unsigned char g_mousedown; extern unsigned char g_mousemoved; diff --git a/ISLE/isle.cpp b/ISLE/isle.cpp index ca81f887..61874225 100644 --- a/ISLE/isle.cpp +++ b/ISLE/isle.cpp @@ -119,15 +119,17 @@ BOOL readReg(LPCSTR name, LPSTR outValue, DWORD outSize) HKEY hKey; DWORD valueType; + BOOL out = FALSE; + unsigned long size = outSize; if (RegOpenKeyExA(HKEY_LOCAL_MACHINE, "SOFTWARE\\Mindscape\\LEGO Island", 0, KEY_READ, &hKey) == ERROR_SUCCESS) { - if (RegQueryValueExA(hKey, name, NULL, &valueType, (LPBYTE) outValue, &outSize) == ERROR_SUCCESS) { + if (RegQueryValueExA(hKey, name, NULL, &valueType, (LPBYTE) outValue, &size) == ERROR_SUCCESS) { if (RegCloseKey(hKey) == ERROR_SUCCESS) { - return TRUE; + out = TRUE; } } } - return FALSE; + return out; } int readRegBool(LPCSTR name, BOOL *out) @@ -234,8 +236,8 @@ void Isle::setupVideoFlags(BOOL fullScreen, BOOL flipSurfaces, BOOL backBuffers, m_videoParam.flags().EnableBackBuffers(backBuffers); m_videoParam.flags().EnableUnknown1(param_6); m_videoParam.flags().SetUnknown3(param_7); - m_videoParam.flags().EnableUnknown2(); m_videoParam.flags().EnableWideViewAngle(wideViewAngle); + m_videoParam.flags().EnableUnknown2(); m_videoParam.SetDeviceName(deviceId); if (using8bit) { m_videoParam.flags().Set8Bit(); diff --git a/ISLE/main.cpp b/ISLE/main.cpp index 51c9b723..a0cd95b1 100644 --- a/ISLE/main.cpp +++ b/ISLE/main.cpp @@ -19,7 +19,7 @@ BOOL findExistingInstance(void) BOOL startDirectSound(void) { - LPDIRECTSOUND lpDS; + LPDIRECTSOUND lpDS = 0; HRESULT ret = DirectSoundCreate(NULL, &lpDS, NULL); if (ret == DS_OK && lpDS != NULL) { lpDS->Release();