From ae06a39d2f646f216abb05908f6e8a6d6077620e Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Sun, 27 Sep 2015 19:59:28 +0100 Subject: [PATCH] v2.4 (build 755) * Also set global scaling factor before the dialog is initialized and remove unneeded scaling initialization. --- ChangeLog.txt | 4 ++-- src/rufus.c | 7 +++++++ src/rufus.rc | 10 +++++----- src/stdlg.c | 5 ----- 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 35dd18afc3f..7213970ec07 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,11 +1,11 @@ -o Version 2.4 (2015.09.??) +o Version 2.4 (2015.09.27) Allow some settings and cheat modes to be persisted between sessions Fix multiple issues with flash drive detection Fix listing of drives that contain no media Fix cheat mode to save the current USB to *uncompressed* VHD (Alt-V) Fix an UI scaling issue with high DPI displays for non English languages Update most of the translations - Minor cosmetic changes + Additional cosmetic improvements o Version 2.3 (2015.08.28) Detect ISOHybrid images and ask users how they should be written diff --git a/src/rufus.c b/src/rufus.c index fd2515bed7a..d4f7214fa80 100644 --- a/src/rufus.c +++ b/src/rufus.c @@ -2749,6 +2749,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine PF_TYPE_DECL(CDECL, int, __wgetmainargs, (int*, wchar_t***, wchar_t***, int, int*)); HANDLE mutex = NULL, hogmutex = NULL, hFile = NULL; HWND hDlg = NULL; + HDC hDC; MSG msg; struct option long_options[] = { {"fixed", no_argument, NULL, 'f'}, @@ -2888,6 +2889,12 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine force_large_fat32 = ReadSettingBool(SETTING_FORCE_LARGE_FAT32_FORMAT); enable_vmdk = ReadSettingBool(SETTING_ENABLE_VMDK_DETECTION); + // Initialize the global scaling, in case we need it before we initialize the dialog + hDC = GetDC(NULL); + fScale = GetDeviceCaps(hDC, LOGPIXELSX) / 96.0f; + if (hDC != NULL) + ReleaseDC(NULL, hDC); + // Init localization init_localization(); // Seek for a loc file in the current directory diff --git a/src/rufus.rc b/src/rufus.rc index e5f6251d54e..6a43a1bb37a 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -32,7 +32,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Rufus 2.4.754" +CAPTION "Rufus 2.4.755" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -317,8 +317,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,4,754,0 - PRODUCTVERSION 2,4,754,0 + FILEVERSION 2,4,755,0 + PRODUCTVERSION 2,4,755,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -335,13 +335,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.4.754" + VALUE "FileVersion", "2.4.755" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", "© 2011-2015 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.4.754" + VALUE "ProductVersion", "2.4.755" END END BLOCK "VarFileInfo" diff --git a/src/stdlg.c b/src/stdlg.c index 6995ea61be3..10e959397da 100644 --- a/src/stdlg.c +++ b/src/stdlg.c @@ -1557,16 +1557,11 @@ void DownloadNewVersion(void) void SetTitleBarIcon(HWND hDlg) { - HDC hDC; int i16, s16, s32; HICON hSmallIcon, hBigIcon; // High DPI scaling i16 = GetSystemMetrics(SM_CXSMICON); - hDC = GetDC(hDlg); - fScale = GetDeviceCaps(hDC, LOGPIXELSX) / 96.0f; - if (hDC != NULL) - ReleaseDC(hDlg, hDC); // Adjust icon size lookup s16 = i16; s32 = (int)(32.0f*fScale);