diff --git a/gfx/common/win32_common.c b/gfx/common/win32_common.c index 82a3a7f03e..7ad1f8e6ef 100644 --- a/gfx/common/win32_common.c +++ b/gfx/common/win32_common.c @@ -132,6 +132,23 @@ void win32_monitor_info(void *data, void *hm_data, unsigned *mon_id) mon->cbSize = sizeof(MONITORINFOEX); GetMonitorInfo(*hm_to_use, (MONITORINFO*)mon); } + +bool win32_window_init(WNDCLASSEX *wndclass) +{ + wndclass->cbSize = sizeof(*wndclass); + wndclass->style = CS_HREDRAW | CS_VREDRAW | CS_OWNDC; + wndclass->lpfnWndProc = WndProc; + wndclass->hInstance = GetModuleHandle(NULL); + wndclass->hCursor = LoadCursor(NULL, IDC_ARROW); + wndclass->lpszClassName = "RetroArch"; + wndclass->hIcon = LoadIcon(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_ICON)); + wndclass->hIconSm = (HICON)LoadImage(GetModuleHandle(NULL), + MAKEINTRESOURCE(IDI_ICON), IMAGE_ICON, 16, 16, 0); + + if (!RegisterClassEx(wndclass)) + return false; + return true; +} #endif static bool win32_browser( diff --git a/gfx/common/win32_common.h b/gfx/common/win32_common.h index 91a5f77b52..d620b56aa4 100644 --- a/gfx/common/win32_common.h +++ b/gfx/common/win32_common.h @@ -47,6 +47,8 @@ void win32_monitor_from_window(HWND data, bool destroy); void win32_monitor_get_info(void); void win32_monitor_info(void *data, void *hm_data, unsigned *mon_id); + +bool win32_window_init(WNDCLASSEX *wndclass); #endif bool win32_suppress_screensaver(void *data, bool enable); diff --git a/gfx/drivers_context/wgl_ctx.c b/gfx/drivers_context/wgl_ctx.c index bc33b19745..d0ed2eb67b 100644 --- a/gfx/drivers_context/wgl_ctx.c +++ b/gfx/drivers_context/wgl_ctx.c @@ -391,23 +391,6 @@ static void gfx_ctx_wgl_get_video_size(void *data, unsigned *width, unsigned *he } } -static bool win32_window_init(WNDCLASSEX *wndclass) -{ - wndclass->cbSize = sizeof(*wndclass); - wndclass->style = CS_HREDRAW | CS_VREDRAW | CS_OWNDC; - wndclass->lpfnWndProc = WndProc; - wndclass->hInstance = GetModuleHandle(NULL); - wndclass->hCursor = LoadCursor(NULL, IDC_ARROW); - wndclass->lpszClassName = "RetroArch"; - wndclass->hIcon = LoadIcon(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_ICON)); - wndclass->hIconSm = (HICON)LoadImage(GetModuleHandle(NULL), - MAKEINTRESOURCE(IDI_ICON), IMAGE_ICON, 16, 16, 0); - - if (!RegisterClassEx(wndclass)) - return false; - return true; -} - static bool gfx_ctx_wgl_init(void *data) { WNDCLASSEX wndclass = {0};