Allow disabling building Win32 "GUI".

This commit is contained in:
Themaister 2013-08-31 11:43:14 +02:00
parent 0720eedd2a
commit 45cfc584f9
2 changed files with 7 additions and 0 deletions

View File

@ -63,6 +63,7 @@ HAVE_STDIN_CMD = 1
HAVE_THREADS = 1
HAVE_RGUI = 1
DYNAMIC = 1
HAVE_WIN32GUI = 1
HAVE_WINXINPUT = 1
@ -103,6 +104,10 @@ ifeq ($(HAVE_RGUI), 1)
OBJ += frontend/menu/menu_common.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

@ -469,6 +469,7 @@ 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)));
@ -477,6 +478,7 @@ static bool gfx_ctx_set_video_mode(
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)
{