From 1520aaa21f731481e99ab32c8448516b9b134963 Mon Sep 17 00:00:00 2001 From: Date: Thu, 21 Apr 2016 00:47:20 -0400 Subject: [PATCH] Constrict window message initializers as ANDROID- and WIN32-only. --- Source/Project64-core/Plugins/GFXPlugin.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Source/Project64-core/Plugins/GFXPlugin.cpp b/Source/Project64-core/Plugins/GFXPlugin.cpp index 0da8e84df..f1060c090 100644 --- a/Source/Project64-core/Plugins/GFXPlugin.cpp +++ b/Source/Project64-core/Plugins/GFXPlugin.cpp @@ -173,13 +173,17 @@ bool CGfxPlugin::Initiate(CN64System * System, RenderWindow * Window) GFX_INFO Info = { 0 }; Info.MemoryBswaped = true; -#ifdef _WIN32 - Info.hWnd = Window ? Window->GetWindowHandle() : NULL; - Info.hStatusBar = Window ? Window->GetStatusBar() : NULL; -#else +#if defined(ANDROID) || defined(__ANDROID__) Info.SwapBuffers = SwapBuffers; +#endif Info.hWnd = NULL; Info.hStatusBar = NULL; +#ifdef _WIN32 + if (Window != NULL) + { + Info.hWnd = Window->GetWindowHandle(); + Info.hStatusBar = Window->GetStatusBar(); + } #endif Info.CheckInterrupts = DummyCheckInterrupts;