Skip to content

Commit

Permalink
Allow DPI awareness in plCrashHandler.
Browse files Browse the repository at this point in the history
No more fuzzy crash dialog! This also fixes a minor visual issue whereby
the Uru Live banner was slightly smaller than the rest of the dialog,
even on 100% scaling.
  • Loading branch information
Hoikas committed Feb 3, 2024
1 parent 80c60a5 commit 2dbd078
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Sources/Plasma/Apps/plCrashHandler/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ target_link_libraries(
CoreLib
plClipboard
plMessageBox
plStatusLog
plWinDpi
pfCrashHandler

$<$<PLATFORM_ID:Windows>:Comctl32>
Expand Down
2 changes: 1 addition & 1 deletion Sources/Plasma/Apps/plCrashHandler/plCrashHandler.rc
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ STYLE DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_FIXEDSYS | DS_CENTER |
EXSTYLE WS_EX_APPWINDOW
FONT 8, "MS Shell Dlg", 400, 0, 0x0
BEGIN
CONTROL IDB_BITMAP,IDB_BITMAP,"Static",SS_BITMAP | SS_SUNKEN,7,7,286,36
CONTROL IDB_BITMAP,IDB_BITMAP,"Static",SS_BITMAP | SS_REALSIZECONTROL,7,7,291,36
LTEXT "Unfortunately, URU has experienced a serious error and had to exit. Please report the following information to the developers.",IDC_STATUS_TEXT,19,57,266,17
GROUPBOX "",IDC_STATIC,7,46,291,49
RTEXT "Product String",IDC_PRODUCTSTRING,19,85,272,8
Expand Down
5 changes: 5 additions & 0 deletions Sources/Plasma/Apps/plCrashHandler/winmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com

#include "plClipboard/plClipboard.h"
#include "plMessageBox/hsMessageBox.h"
#include "plStatusLog/plStatusLog.h"
#include "plWinDpi/plWinDpi.h"

#include "pfCrashHandler/plCrashSrv.h"

Expand Down Expand Up @@ -363,6 +365,9 @@ static void IShowCrashDialog(HINSTANCE hInstance)

int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PWSTR pCmdLine, int nCmdShow)
{
plStatusLog::fLoggingOff = true;
plWinDpi::Instance();

enum { kArgCrashFile, kArgForceShow };
const plCmdArgDef cmdLineArgs[] = {
{ kCmdArgRequired | kCmdTypeString, "file", kArgCrashFile },
Expand Down

0 comments on commit 2dbd078

Please sign in to comment.