From ed378d4e0b37520fdb76c0d107690e2ac9eaaa75 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Sat, 1 Jun 2019 10:18:47 -0400 Subject: [PATCH] Cleaned up some easy-to-fix TODOs on Windows, including a LONGTERM that will not be relevant to libui in its current architecture (that'll be handled with a custom build step that converts resources to source code). Next: making resources.rc truly shared-only to reduce the noise further. --- windows/main.cpp | 11 ++++------- windows/resources.rc | 2 -- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/windows/main.cpp b/windows/main.cpp index 8fd276ad..671c203a 100644 --- a/windows/main.cpp +++ b/windows/main.cpp @@ -105,10 +105,8 @@ void uiMain(void) hr = uiprivHrGetMessageW(&msg, NULL, 0, 0); if (hr == S_FALSE) // WM_QUIT return; - if (hr != S_OK) { - // TODO log error - return; - } + if (hr != S_OK) + uiprivInternalError("GetMessageW() failed in uiMain(): 0x%08I32X", hr); // TODO IsDialogMessage() TranslateMessage(&msg); DispatchMessageW(&msg); @@ -127,9 +125,8 @@ void uiprivSysQueueMain(void (*f)(void *data), void *data) HRESULT hr; hr = uiprivHrPostMessageW(uiprivUtilWindow, uiprivUtilWindowMsgQueueMain, (WPARAM) f, (LPARAM) data); - if (hr != S_OK) { - // TODO handle error - } + if (hr != S_OK) + uiprivInternalError("PostMessageW() failed in uiQueueMain(): 0x%08I32X", hr); } bool uiprivSysCheckThread(void) diff --git a/windows/resources.rc b/windows/resources.rc index 4a2fd365..137147fc 100644 --- a/windows/resources.rc +++ b/windows/resources.rc @@ -1,13 +1,11 @@ // 30 may 2015 #include "winapi.hpp" -//TODO#include "resources.hpp" // this is a UTF-8 file #pragma code_page(65001) // this is the Common Controls 6 manifest // we only define it in a shared build; static builds have to include the appropriate parts of the manifest in the output executable -// LONGTERM set up the string values here #ifndef uiStatic ISOLATIONAWARE_MANIFEST_RESOURCE_ID RT_MANIFEST "libui.manifest" #endif