From 8e5a0b4a38c414becd712636360f216aceb31661 Mon Sep 17 00:00:00 2001 From: Themaister Date: Fri, 27 Sep 2013 16:35:12 +0200 Subject: [PATCH] Remove the stub Win32 GUI. It is only confusing and doesn't add anything atm. If we want to go for WIMP-based GUI, it will be using a multi-platform toolkit anyways. --- Makefile.win | 5 ---- gfx/context/wgl_ctx.c | 53 ------------------------------------------- media/rarch.rc | 12 ---------- media/resource.h | 6 ----- 4 files changed, 76 deletions(-) delete mode 100644 media/resource.h diff --git a/Makefile.win b/Makefile.win index 7b3d8f2b2d..08ff51c4a5 100644 --- a/Makefile.win +++ b/Makefile.win @@ -64,7 +64,6 @@ HAVE_STDIN_CMD = 1 HAVE_THREADS = 1 HAVE_RGUI = 1 DYNAMIC = 1 -HAVE_WIN32GUI = 1 HAVE_WINXINPUT = 1 @@ -105,10 +104,6 @@ ifeq ($(HAVE_RGUI), 1) OBJ += frontend/menu/menu_common.o frontend/menu/menu_context.o frontend/menu/rgui.o frontend/menu/history.o endif -ifeq ($(HAVE_WIN32GUI), 1) - DEFINES += -DHAVE_WIN32GUI -endif - ifeq ($(HAVE_SDL), 1) OBJ += gfx/sdl_gfx.o input/sdl_input.o input/sdl_joypad.o audio/sdl_audio.o JOBJ += input/sdl_joypad.o diff --git a/gfx/context/wgl_ctx.c b/gfx/context/wgl_ctx.c index e8667ff66e..674b28564a 100644 --- a/gfx/context/wgl_ctx.c +++ b/gfx/context/wgl_ctx.c @@ -25,7 +25,6 @@ #include "../gfx_context.h" #include "../gl_common.h" #include "../gfx_common.h" -#include "../../media/resource.h" #include #include #include @@ -176,24 +175,6 @@ static void create_gl_context(HWND hwnd) } } -static bool BrowseForFile(char *filename) -{ - OPENFILENAME ofn; - memset(&ofn, 0, sizeof(OPENFILENAME)); - - ofn.lStructSize = sizeof(OPENFILENAME); - ofn.hwndOwner = g_hwnd; - ofn.lpstrFilter = "All Files\0*.*\0\0"; - ofn.lpstrFile = filename; - ofn.lpstrTitle = "Select ROM"; - ofn.lpstrDefExt = ""; - ofn.nMaxFile = PATH_MAX; - ofn.Flags = OFN_FILEMUSTEXIST | OFN_HIDEREADONLY; - if (GetOpenFileName(&ofn)) - return true; - return false; -} - static LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam) { @@ -244,29 +225,6 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT message, g_resized = true; } return 0; - - case WM_COMMAND: - switch (wparam & 0xffff) - { - case ID_M_OPENROM: - { - char rom_file[PATH_MAX] = {0}; - if (BrowseForFile(rom_file)) - { - strlcpy(g_extern.fullpath, rom_file, sizeof(g_extern.fullpath)); - g_extern.lifecycle_mode_state |= (1ULL << MODE_LOAD_GAME); - PostMessage(g_hwnd, WM_CLOSE, 0, 0); - } - break; - } - case ID_M_RESET: - rarch_game_reset(); - break; - case ID_M_QUIT: - PostMessage(g_hwnd, WM_CLOSE, 0, 0); - break; - } - break; } return DefWindowProc(hwnd, message, wparam, lparam); @@ -469,17 +427,6 @@ static bool gfx_ctx_set_video_mode( if (!g_hwnd) goto error; -#ifdef HAVE_WIN32GUI - if (!fullscreen) - { - SetMenu(g_hwnd, LoadMenu(GetModuleHandle(NULL), MAKEINTRESOURCE(IDR_MENU))); - RECT rcTemp = {0, 0, width, 0x7FFF}; // 0x7FFF = "Infinite" height - SendMessage(g_hwnd, WM_NCCALCSIZE, FALSE, (LPARAM)&rcTemp); // recalculate margin, taking possible menu wrap into account - unsigned menu_height = rcTemp.top + rect.top; // rect.top is negative after AdjustWindowRect(). - SetWindowPos(g_hwnd, NULL, 0, 0, width, height + menu_height, SWP_NOMOVE); - } -#endif - if (!fullscreen || windowed_full) { ShowWindow(g_hwnd, SW_RESTORE); diff --git a/media/rarch.rc b/media/rarch.rc index e5b6d5f440..271494820e 100644 --- a/media/rarch.rc +++ b/media/rarch.rc @@ -1,13 +1 @@ -#include "resource.h" 1 ICON "retroarch-icon.ico" - -IDR_MENU MENU -BEGIN - POPUP "File" - BEGIN - MENUITEM "Open ROM", ID_M_OPENROM - MENUITEM SEPARATOR - MENUITEM "Reset", ID_M_RESET - MENUITEM "Quit", ID_M_QUIT - END -END \ No newline at end of file diff --git a/media/resource.h b/media/resource.h deleted file mode 100644 index d2e2e71f38..0000000000 --- a/media/resource.h +++ /dev/null @@ -1,6 +0,0 @@ -// Used by rarch.rc -// -#define IDR_MENU 101 -#define ID_M_OPENROM 40001 -#define ID_M_RESET 40002 -#define ID_M_QUIT 40003