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.
This commit is contained in:
Themaister 2013-09-27 16:35:12 +02:00
parent 928cba0211
commit 8e5a0b4a38
4 changed files with 0 additions and 76 deletions

View File

@ -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

View File

@ -25,7 +25,6 @@
#include "../gfx_context.h"
#include "../gl_common.h"
#include "../gfx_common.h"
#include "../../media/resource.h"
#include <windows.h>
#include <commdlg.h>
#include <string.h>
@ -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);

View File

@ -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

View File

@ -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