From 4adc88d67032034a4f6952f6919d9b5336e7cab5 Mon Sep 17 00:00:00 2001 From: pineappleEA Date: Sun, 14 Feb 2021 10:10:28 +0100 Subject: [PATCH] early-access version 1459 --- README.md | 2 +- dist/qt_themes/colorful_dark/icons/index.theme | 2 +- .../colorful_midnight_blue/icons/index.theme | 2 +- .../qdarkstyle_midnight_blue/style.qss | 4 ---- dist/yuzu.bmp | Bin 0 -> 262282 bytes src/video_core/shader/async_shaders.cpp | 1 + src/yuzu/CMakeLists.txt | 1 + src/yuzu/main.cpp | 10 +++------- src/yuzu/main.ui | 8 +++++--- src/yuzu/yuzu.qrc | 5 +++++ src/yuzu_cmd/CMakeLists.txt | 13 +++++++++++++ src/yuzu_cmd/emu_window/emu_window_sdl2.cpp | 17 +++++++++++++++++ src/yuzu_cmd/emu_window/emu_window_sdl2.h | 3 +++ src/yuzu_cmd/emu_window/emu_window_sdl2_gl.cpp | 2 ++ src/yuzu_cmd/emu_window/emu_window_sdl2_vk.cpp | 2 ++ 15 files changed, 55 insertions(+), 17 deletions(-) create mode 100755 dist/yuzu.bmp create mode 100755 src/yuzu/yuzu.qrc diff --git a/README.md b/README.md index 80adb89fe..e8d35fd6d 100755 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ yuzu emulator early access ============= -This is the source code for early-access 1458. +This is the source code for early-access 1459. ## Legal Notice diff --git a/dist/qt_themes/colorful_dark/icons/index.theme b/dist/qt_themes/colorful_dark/icons/index.theme index 94d5ae8aa..19dc0369a 100755 --- a/dist/qt_themes/colorful_dark/icons/index.theme +++ b/dist/qt_themes/colorful_dark/icons/index.theme @@ -1,7 +1,7 @@ [Icon Theme] Name=colorful_dark Comment=Colorful theme (Dark style) -Inherits=default +Inherits=colorful Directories=16x16 [16x16] diff --git a/dist/qt_themes/colorful_midnight_blue/icons/index.theme b/dist/qt_themes/colorful_midnight_blue/icons/index.theme index e23bfe6f9..dcb2c50d6 100755 --- a/dist/qt_themes/colorful_midnight_blue/icons/index.theme +++ b/dist/qt_themes/colorful_midnight_blue/icons/index.theme @@ -1,7 +1,7 @@ [Icon Theme] Name=colorful_midnight_blue Comment=Colorful theme (Midnight Blue style) -Inherits=default +Inherits=colorful Directories=16x16 [16x16] diff --git a/dist/qt_themes/qdarkstyle_midnight_blue/style.qss b/dist/qt_themes/qdarkstyle_midnight_blue/style.qss index 70e540b06..a64037455 100755 --- a/dist/qt_themes/qdarkstyle_midnight_blue/style.qss +++ b/dist/qt_themes/qdarkstyle_midnight_blue/style.qss @@ -1257,10 +1257,6 @@ QComboBox::item:alternate { background: #19232D; } -QComboBox::item:checked { - font-weight: bold; -} - QComboBox::item:selected { border: 0px solid transparent; } diff --git a/dist/yuzu.bmp b/dist/yuzu.bmp new file mode 100755 index 0000000000000000000000000000000000000000..66f2f696f015f4c8e68c4859e8a1bda57fd5c05c GIT binary patch literal 262282 zcmeI53)mJ_wZ}IBf`Fol7Wy276h!eBWQvFoNAmKRsFnB5K`qRamQQw5?0Cyi^HOBj9`f>-)aJ`NsD$Yt7y>d(SK%7xTXFthHy) zeEav`Yxd0SnedtOO%Fr=oew*WK6LA_Zf3CQPTxD%w|`vsPtBN)|LK?7guM?w`HVSl z4WHaLXw$*x{H@#gQKL3FW6G3aU3NMy+no1tE&xDb4wSP5$fY!YknaHrUr-BUB60YoU~BPF&Q!b=g`6 zC>MDBf!<~f99OnZA zcB+{`#{}}`KduMM!T)uz{bB2=7If7DDbt*|c-z*`>9rt!KG1f}fu`^9n&~;TLjwXE z6DX4ZxE8zt{x5;;qB_u_100T}zRG-h=99-NIv=P#W6b%MAp+`Iz+BHHS`H!^V-{AiW*zhXq z0Ec6#ukz00z0vWa^MQA8pTNqwz1y!51~ew%Gyjne(6S9Srb;>>WttP$s6FfNd|il- z3Cy_qK(it47YtxrFckhHEui}pcdvpDa5$FwD(8I8n;o-tV*H)10_wZCTgJv|*hFgfT7{D*urVJPZxkv5Y#v;aKXcjLR5rb=;EUf}cAK z421JPF$;Ytn0JsLo_b9cA+tc(6xcV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theme_paths.append(default_icons); QIcon::setThemeName(default_icons); } else { const QString theme_uri(QLatin1Char{':'} + current_theme + QStringLiteral("/style.qss")); @@ -2980,10 +2979,7 @@ void GMainWindow::UpdateUITheme() { } else { LOG_ERROR(Frontend, "Unable to set style, stylesheet file not found"); } - - const QString theme_name = QStringLiteral(":/icons/") + current_theme; - theme_paths.append({default_icons, theme_name}); - QIcon::setThemeName(theme_name); + QIcon::setThemeName(current_theme); } QIcon::setThemeSearchPaths(theme_paths); diff --git a/src/yuzu/main.ui b/src/yuzu/main.ui index e2ad5baf6..048870687 100755 --- a/src/yuzu/main.ui +++ b/src/yuzu/main.ui @@ -14,8 +14,8 @@ yuzu - - ../dist/yuzu.ico../dist/yuzu.ico + + :/img/yuzu.ico:/img/yuzu.ico QTabWidget::Rounded @@ -303,6 +303,8 @@ - + + + diff --git a/src/yuzu/yuzu.qrc b/src/yuzu/yuzu.qrc new file mode 100755 index 000000000..5733cac98 --- /dev/null +++ b/src/yuzu/yuzu.qrc @@ -0,0 +1,5 @@ + + + ../../dist/yuzu.ico + + diff --git a/src/yuzu_cmd/CMakeLists.txt b/src/yuzu_cmd/CMakeLists.txt index 0b3f2cb54..8461f8896 100755 --- a/src/yuzu_cmd/CMakeLists.txt +++ b/src/yuzu_cmd/CMakeLists.txt @@ -1,5 +1,15 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/CMakeModules) +function(create_resource file output filename) + # Read hex data from file + file(READ ${file} filedata HEX) + # Convert hex data for C compatibility + string(REGEX REPLACE "([0-9a-f][0-9a-f])" "0x\\1," filedata ${filedata}) + # Write data to output file + set(RESOURCES_DIR "${PROJECT_BINARY_DIR}/dist" PARENT_SCOPE) + file(WRITE "${PROJECT_BINARY_DIR}/dist/${output}" "const unsigned char ${filename}[] = {${filedata}};\nconst unsigned ${filename}_size = sizeof(${filename});\n") +endfunction() + add_executable(yuzu-cmd config.cpp config.h @@ -24,6 +34,9 @@ if (MSVC) endif() target_link_libraries(yuzu-cmd PRIVATE ${PLATFORM_LIBRARIES} SDL2 Threads::Threads) +create_resource("../../dist/yuzu.bmp" "yuzu_cmd/yuzu_icon.h" "yuzu_icon") +target_include_directories(yuzu-cmd PRIVATE ${RESOURCES_DIR}) + target_include_directories(yuzu-cmd PRIVATE ../../externals/Vulkan-Headers/include) if(UNIX AND NOT APPLE) diff --git a/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp b/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp index 39841aa28..7e391ab89 100755 --- a/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp +++ b/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp @@ -12,6 +12,7 @@ #include "input_common/mouse/mouse_input.h" #include "input_common/sdl/sdl.h" #include "yuzu_cmd/emu_window/emu_window_sdl2.h" +#include "yuzu_cmd/yuzu_icon.h" EmuWindow_SDL2::EmuWindow_SDL2(InputCommon::InputSubsystem* input_subsystem_) : input_subsystem{input_subsystem_} { @@ -194,6 +195,22 @@ void EmuWindow_SDL2::WaitEvent() { } } +void EmuWindow_SDL2::SetWindowIcon() { + SDL_RWops* const yuzu_icon_stream = SDL_RWFromConstMem((void*)yuzu_icon, yuzu_icon_size); + if (yuzu_icon_stream == nullptr) { + LOG_WARNING(Frontend, "Failed to create yuzu icon stream."); + return; + } + SDL_Surface* const window_icon = SDL_LoadBMP_RW(yuzu_icon_stream, 1); + if (window_icon == nullptr) { + LOG_WARNING(Frontend, "Failed to read BMP from stream."); + return; + } + // The icon is attached to the window pointer + SDL_SetWindowIcon(render_window, window_icon); + SDL_FreeSurface(window_icon); +} + void EmuWindow_SDL2::OnMinimalClientAreaChangeRequest(std::pair minimal_size) { SDL_SetWindowMinimumSize(render_window, minimal_size.first, minimal_size.second); } diff --git a/src/yuzu_cmd/emu_window/emu_window_sdl2.h b/src/yuzu_cmd/emu_window/emu_window_sdl2.h index a93141240..51a12a6a9 100755 --- a/src/yuzu_cmd/emu_window/emu_window_sdl2.h +++ b/src/yuzu_cmd/emu_window/emu_window_sdl2.h @@ -32,6 +32,9 @@ public: /// Wait for the next event on the main thread. void WaitEvent(); + // Sets the window icon from yuzu.bmp + void SetWindowIcon(); + protected: /// Called by WaitEvent when a key is pressed or released. void OnKeyEvent(int key, u8 state); diff --git a/src/yuzu_cmd/emu_window/emu_window_sdl2_gl.cpp b/src/yuzu_cmd/emu_window/emu_window_sdl2_gl.cpp index deddea9ee..a02485c14 100755 --- a/src/yuzu_cmd/emu_window/emu_window_sdl2_gl.cpp +++ b/src/yuzu_cmd/emu_window/emu_window_sdl2_gl.cpp @@ -107,6 +107,8 @@ EmuWindow_SDL2_GL::EmuWindow_SDL2_GL(InputCommon::InputSubsystem* input_subsyste dummy_window = SDL_CreateWindow(NULL, SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, 0, 0, SDL_WINDOW_HIDDEN | SDL_WINDOW_OPENGL); + SetWindowIcon(); + if (fullscreen) { Fullscreen(); } diff --git a/src/yuzu_cmd/emu_window/emu_window_sdl2_vk.cpp b/src/yuzu_cmd/emu_window/emu_window_sdl2_vk.cpp index 3ba657c00..6f9b00461 100755 --- a/src/yuzu_cmd/emu_window/emu_window_sdl2_vk.cpp +++ b/src/yuzu_cmd/emu_window/emu_window_sdl2_vk.cpp @@ -35,6 +35,8 @@ EmuWindow_SDL2_VK::EmuWindow_SDL2_VK(InputCommon::InputSubsystem* input_subsyste std::exit(EXIT_FAILURE); } + SetWindowIcon(); + switch (wm.subsystem) { #ifdef SDL_VIDEO_DRIVER_WINDOWS case SDL_SYSWM_TYPE::SDL_SYSWM_WINDOWS: