mirror of
https://github.com/libretro/RetroArch
synced 2025-01-27 03:35:22 +00:00
g_hwnd no longer used outside
This commit is contained in:
parent
922b679769
commit
4d7daf5dfd
@ -50,7 +50,7 @@ static unsigned g_pos_y = CW_USEDEFAULT;
|
||||
static bool g_resized;
|
||||
bool g_inited;
|
||||
bool g_quit;
|
||||
HWND g_hwnd;
|
||||
static HWND g_hwnd;
|
||||
|
||||
extern void *dinput_wgl;
|
||||
extern void *curD3D;
|
||||
@ -690,3 +690,11 @@ HWND win32_get_window(void)
|
||||
{
|
||||
return g_hwnd;
|
||||
}
|
||||
|
||||
void win32_destroy_window(void)
|
||||
{
|
||||
#ifndef _XBOX
|
||||
UnregisterClass("RetroArch", GetModuleHandle(NULL));
|
||||
#endif
|
||||
g_hwnd = NULL;
|
||||
}
|
||||
|
@ -36,7 +36,6 @@ extern unsigned g_resize_height;
|
||||
extern bool g_quit;
|
||||
extern bool g_inited;
|
||||
extern bool g_restore_desktop;
|
||||
extern HWND g_hwnd;
|
||||
|
||||
LRESULT win32_handle_keyboard_event(HWND hwnd, UINT message,
|
||||
WPARAM wparam, LPARAM lparam);
|
||||
@ -82,4 +81,6 @@ bool win32_has_focus(void);
|
||||
void win32_check_window(bool *quit,
|
||||
bool *resize, unsigned *width, unsigned *height);
|
||||
|
||||
void win32_destroy_window(void);
|
||||
|
||||
#endif
|
||||
|
@ -853,9 +853,7 @@ static void d3d_free(void *data)
|
||||
if (d3d)
|
||||
delete d3d;
|
||||
|
||||
#ifndef _XBOX
|
||||
UnregisterClass("RetroArch", GetModuleHandle(NULL));
|
||||
#endif
|
||||
win32_destroy_window();
|
||||
}
|
||||
|
||||
#ifndef DONT_HAVE_STATE_TRACKER
|
||||
|
@ -372,8 +372,7 @@ static void gfx_ctx_wgl_destroy(void *data)
|
||||
if (window)
|
||||
{
|
||||
win32_monitor_from_window(window, true);
|
||||
UnregisterClass("RetroArch", GetModuleHandle(NULL));
|
||||
g_hwnd = NULL;
|
||||
win32_destroy_window();
|
||||
}
|
||||
|
||||
if (g_restore_desktop)
|
||||
|
Loading…
x
Reference in New Issue
Block a user