# HG changeset patch # User Paper # Date 1699174918 18000 # Node ID c8c72278f6fdee49e792d0b3f12c722e5ad0fa35 # Parent 6d8da6e64d619c5c797a455fc2b860aaa8c15c5d *: #if -> #ifdef, remove outdated comments in sys/win32/dark_theme.cc diff -r 6d8da6e64d61 -r c8c72278f6fd src/core/filesystem.cc --- a/src/core/filesystem.cc Sun Nov 05 03:54:26 2023 -0500 +++ b/src/core/filesystem.cc Sun Nov 05 04:01:58 2023 -0500 @@ -57,7 +57,7 @@ } bool Path::Exists() const { -#if WIN32 +#ifdef WIN32 std::wstring buf = Strings::ToWstring(_path); return GetFileAttributesW(buf.c_str()) != INVALID_FILE_ATTRIBUTES; #else diff -r 6d8da6e64d61 -r c8c72278f6fd src/gui/pages/anime_list.cc --- a/src/gui/pages/anime_list.cc Sun Nov 05 03:54:26 2023 -0500 +++ b/src/gui/pages/anime_list.cc Sun Nov 05 04:01:58 2023 -0500 @@ -40,7 +40,7 @@ void AnimeListPageDelegate::paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const { switch (index.column()) { -#if 0 +#if 0 /* I'm just commenting this out for now. Seems like a huge headache to do with Qt. */ case AnimeListPageModel::AL_PROGRESS: { const int progress = static_cast(index.data(Qt::UserRole).toReal()); const int episodes = diff -r 6d8da6e64d61 -r c8c72278f6fd src/gui/window.cc --- a/src/gui/window.cc Sun Nov 05 03:54:26 2023 -0500 +++ b/src/gui/window.cc Sun Nov 05 04:01:58 2023 -0500 @@ -31,7 +31,7 @@ #include #include #include -#if MACOSX +#ifdef MACOSX # include "sys/osx/dark_theme.h" #elif defined(WIN32) # include "sys/win32/dark_theme.h" diff -r 6d8da6e64d61 -r c8c72278f6fd src/sys/win32/dark_theme.cc --- a/src/sys/win32/dark_theme.cc Sun Nov 05 03:54:26 2023 -0500 +++ b/src/sys/win32/dark_theme.cc Sun Nov 05 04:01:58 2023 -0500 @@ -16,8 +16,10 @@ Unload(); } void Unload() { - if (hInstance) + if (hInstance) { FreeLibrary(hInstance); + hInstance = nullptr; + } loaded = false; } void Load(LPCWSTR name) { @@ -63,7 +65,6 @@ return set_wind_attrib(hWnd, key, data, sz_data); } -/* Ok, so this doesn't work. Woohoo! :) */ bool SetTitleBarToBlack(QWidget* win, bool enabled) { BOOL b = enabled; @@ -77,7 +78,6 @@ } { - /* It's 19 in older Windows 10 versions. Yeah, stupid. */ HRESULT result = SetWindowAttribute(reinterpret_cast(win->winId()), 19, &b, sizeof(b)); if (result == S_OK) return b;