From 4afe1686dadc7ddcdff3de218f3ff87cd8b9a955 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 2 Jan 2024 17:23:05 +0100 Subject: [PATCH] hide the old main window as it no longer contains the startup. --- src/common/platform/win32/i_mainwindow.cpp | 2 +- src/common/widgets/widgetresourcedata.cpp | 6 ++--- src/win32/zdoom.rc | 30 ---------------------- 3 files changed, 3 insertions(+), 35 deletions(-) diff --git a/src/common/platform/win32/i_mainwindow.cpp b/src/common/platform/win32/i_mainwindow.cpp index b96e556bd..fe0ad730a 100644 --- a/src/common/platform/win32/i_mainwindow.cpp +++ b/src/common/platform/win32/i_mainwindow.cpp @@ -52,7 +52,7 @@ void MainWindow::Create(const FString& caption, int x, int y, int width, int hei WS_EX_APPWINDOW, WinClassName, wcaption.c_str(), - WS_OVERLAPPEDWINDOW | WS_VISIBLE | WS_CLIPCHILDREN, + WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN, x, y, width, height, (HWND)NULL, (HMENU)NULL, diff --git a/src/common/widgets/widgetresourcedata.cpp b/src/common/widgets/widgetresourcedata.cpp index d2e468a44..ad8bd747f 100644 --- a/src/common/widgets/widgetresourcedata.cpp +++ b/src/common/widgets/widgetresourcedata.cpp @@ -19,8 +19,7 @@ std::vector LoadWidgetFontData(const std::string& name) I_FatalError("Unable to find %s", name.c_str()); auto reader = WidgetResources->GetEntryReader(lump, FileSys::READER_SHARED); - std::vector buffer; - buffer.resize(reader.GetLength()); + std::vector buffer(reader.GetLength()); reader.Read(buffer.data(), buffer.size()); return buffer; } @@ -32,8 +31,7 @@ std::vector LoadWidgetImageData(const std::string& name) I_FatalError("Unable to find %s", name.c_str()); auto reader = WidgetResources->GetEntryReader(lump, FileSys::READER_SHARED); - std::vector buffer; - buffer.resize(reader.GetLength()); + std::vector buffer(reader.GetLength()); reader.Read(buffer.data(), buffer.size()); return buffer; } diff --git a/src/win32/zdoom.rc b/src/win32/zdoom.rc index 619fd0904..6536ee91f 100644 --- a/src/win32/zdoom.rc +++ b/src/win32/zdoom.rc @@ -202,36 +202,6 @@ END // Dialog // -IDD_IWADDIALOG DIALOGEX 0, 0, 225, 248 -STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -EXSTYLE WS_EX_APPWINDOW -CAPTION "Welcome" -FONT 8, "MS Shell Dlg", 0, 0, 0x1 -BEGIN - ICON IDI_ICON1,IDC_STATIC,7,7,20,20 - LTEXT "Welcome to GZDoom!",IDC_STATIC,43,8,180,8 - LTEXT "",IDC_WELCOME_VERSION,43,18,180,8 - GROUPBOX "IWAD selection",IDC_STATIC,8,32,208,117 - LTEXT "Select which game file (IWAD) to run.",IDC_STATIC,12,44,190,8 - LISTBOX IDC_IWADLIST,12,56,200,87,LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP - GROUPBOX "Video settings",IDC_STATIC,8,155,68,65 - CONTROL "&Fullscreen",IDC_WELCOME_FULLSCREEN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,206,48,10 - GROUPBOX "Extra Graphics",IDC_STATIC,159,155,59,64 - CONTROL "Disable &autoload",IDC_WELCOME_NOAUTOLOAD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,86,166,65,10 - CONTROL "&Lights",IDC_WELCOME_LIGHTS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,164,165,43,10 - CONTROL "&Brightmaps",IDC_WELCOME_BRIGHTMAPS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,164,177,51,10 - CONTROL "&Widescreen",IDC_WELCOME_WIDESCREEN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,164,188,48,12 - CONTROL "&Don't ask me again",IDC_DONTASKIWAD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,83,190,72,10 - DEFPUSHBUTTON "&Play Game!",IDOK,8,227,90,14 - PUSHBUTTON "E&xit",IDCANCEL,166,227,50,14 - CONTROL "&OpenGL",IDC_WELCOME_VULKAN1,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,13,167,41,10 -#ifdef HAVE_VULKAN - CONTROL "&Vulkan",IDC_WELCOME_VULKAN2,"Button",BS_AUTORADIOBUTTON,13,176,37,10 -#endif -#ifdef HAVE_GLES2 - CONTROL "OpenGL &ES",IDC_WELCOME_VULKAN4,"Button",BS_AUTORADIOBUTTON,13,185,53,10 -#endif -END IDD_CRASHDIALOG DIALOGEX 0, 0, 415, 308 STYLE DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU