Merge pull request #1168 from Frank-74/patch-7

[Glide64] Remove redundant WINPROC_OVERRIDE
This commit is contained in:
zilmar 2016-08-14 04:58:26 +10:00 committed by GitHub
commit 76b5050928
1 changed files with 0 additions and 41 deletions

View File

@ -79,12 +79,6 @@ int ev_fullscreen = 0;
HINSTANCE hinstDLL = NULL;
#endif
#ifdef WINPROC_OVERRIDE
LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
WNDPROC oldWndProc = NULL;
WNDPROC myWndProc = NULL;
#endif
#ifdef ALTTAB_FIX
HHOOK hhkLowLevelKybd = NULL;
LRESULT CALLBACK LowLevelKeyboardProc(int nCode,
@ -1284,11 +1278,6 @@ void CALL CloseDLL(void)
{
WriteTrace(TraceGlide64, TraceDebug, "-");
// re-set the old window proc
#ifdef WINPROC_OVERRIDE
SetWindowLongPtr(gfx.hWnd, GWLP_WNDPROC, (LONG_PTR)oldWndProc);
#endif
#ifdef ALTTAB_FIX
if (hhkLowLevelKybd)
{
@ -1414,15 +1403,6 @@ int CALL InitiateGFX(GFX_INFO Gfx_Info)
gfx = Gfx_Info;
#ifdef WINPROC_OVERRIDE
// [H.Morii] inject our own winproc so that "alt-enter to fullscreen"
// message is shown when the emulator window is activated.
WNDPROC curWndProc = (WNDPROC)GetWindowLongPtr(gfx.hWnd, GWLP_WNDPROC);
if (curWndProc && curWndProc != (WNDPROC)WndProc) {
oldWndProc = (WNDPROC)SetWindowLongPtr(gfx.hWnd, GWLP_WNDPROC, (LONG_PTR)WndProc);
}
#endif
util_init();
math_init();
TexCacheInit();
@ -2390,27 +2370,6 @@ void CALL SurfaceChanged(int width, int height)
}
#endif
#ifdef WINPROC_OVERRIDE
LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
switch (msg)
{
case WM_ACTIVATEAPP:
if (wParam == TRUE && !GfxInitDone) rdp.window_changed = TRUE;
break;
case WM_PAINT:
if (!GfxInitDone) rdp.window_changed = TRUE;
break;
/* case WM_DESTROY:
SetWindowLong (gfx.hWnd, GWL_WNDPROC, (long)oldWndProc);
break;*/
}
return CallWindowProc(oldWndProc, hwnd, msg, wParam, lParam);
}
#endif
int CheckKeyPressed(int key, int mask)
{
static Glide64Keys g64Keys;