From fe253c08a3f7215cd6298e3a29008082c712974b Mon Sep 17 00:00:00 2001 From: Mathieu Schroeter Date: Thu, 9 Feb 2017 18:34:40 +0100 Subject: [PATCH] Remove hinstance obsolete stuff --- blupi.cpp | 6 ++---- misc.cpp | 9 --------- misc.h | 1 - 3 files changed, 2 insertions(+), 14 deletions(-) diff --git a/blupi.cpp b/blupi.cpp index cda21b9..59d5591 100644 --- a/blupi.cpp +++ b/blupi.cpp @@ -412,7 +412,7 @@ bool InitFail(char *msg, bool bDirectX) // Initialisation de l'application. -static bool DoInit(HINSTANCE hInstance, LPSTR lpCmdLine, int nCmdShow) +static bool DoInit(LPSTR lpCmdLine, int nCmdShow) { POINT totalDim, iconDim; RECT rcRect; @@ -420,8 +420,6 @@ static bool DoInit(HINSTANCE hInstance, LPSTR lpCmdLine, int nCmdShow) bOK = ReadConfig(lpCmdLine); // lit le fichier config.def - InitHInstance(hInstance); - SDL_SetMainReady (); auto res = SDL_Init (SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_TIMER); if (res < 0) @@ -628,7 +626,7 @@ static bool DoInit(HINSTANCE hInstance, LPSTR lpCmdLine, int nCmdShow) int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { - if (!DoInit(hInstance, lpCmdLine, nCmdShow)) + if (!DoInit(lpCmdLine, nCmdShow)) return false; SDL_TimerID updateTimer = SDL_AddTimer (g_timerInterval, [] (Uint32 interval, void *param) -> Uint32 diff --git a/misc.cpp b/misc.cpp index b664704..d28bd85 100644 --- a/misc.cpp +++ b/misc.cpp @@ -9,19 +9,10 @@ // Variables globales -HINSTANCE g_hInstance; extern bool g_bFullScreen; // false si mode de test extern int g_mouseType; -// Initialise HInstance. - -void InitHInstance(HINSTANCE hInstance) -{ - g_hInstance = hInstance; -} - - // Affiche un message de debug. void OutputDebug(char *pMessage) diff --git a/misc.h b/misc.h index 139e6d8..9506208 100644 --- a/misc.h +++ b/misc.h @@ -5,7 +5,6 @@ #include -extern void InitHInstance(HINSTANCE hInstance); extern void OutputDebug(char *pMessage); extern POINT ConvLongToPos(LPARAM lParam);