mirror of
https://github.com/isledecomp/isle-portable.git
synced 2024-11-22 07:28:00 -05:00
Merge pull request #4 from mosswg/match-to-original
Match some functions and values to the original binary
This commit is contained in:
commit
363ebd2077
4 changed files with 9 additions and 8 deletions
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue