mirror of
https://github.com/BanjoRecomp/BanjoRecomp
synced 2026-06-02 17:48:27 -04:00
Fix thumbnails on game mode and add game icon. (#111)
* Add display name and thumbnail bytes to the game. * Update modern runtime for verification. * Update RecompFrontend to point to main.
This commit is contained in:
+8
-7
@@ -175,6 +175,14 @@ target_include_directories(BanjoRecompiled PRIVATE
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
||||
|
||||
# Generate icon_bytes.c from the app icon PNG.
|
||||
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/icon_bytes.c ${CMAKE_CURRENT_BINARY_DIR}/icon_bytes.h
|
||||
COMMAND file_to_c ${CMAKE_SOURCE_DIR}/icons/app.png icon_bytes ${CMAKE_CURRENT_BINARY_DIR}/icon_bytes.c ${CMAKE_CURRENT_BINARY_DIR}/icon_bytes.h
|
||||
DEPENDS ${CMAKE_SOURCE_DIR}/icons/app.png
|
||||
)
|
||||
|
||||
target_sources(BanjoRecompiled PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/icon_bytes.c)
|
||||
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 8 AND CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|amd64|AMD64")
|
||||
target_compile_options(BanjoRecompiled PRIVATE
|
||||
-march=nehalem
|
||||
@@ -262,13 +270,6 @@ if (CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
add_compile_definitions("PLUME_SDL_VULKAN_ENABLED")
|
||||
add_compile_definitions("RT64_SDL_WINDOW_VULKAN")
|
||||
|
||||
# Generate icon_bytes.c from the app icon PNG.
|
||||
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/icon_bytes.c ${CMAKE_CURRENT_BINARY_DIR}/icon_bytes.h
|
||||
COMMAND file_to_c ${CMAKE_SOURCE_DIR}/icons/app.png icon_bytes ${CMAKE_CURRENT_BINARY_DIR}/icon_bytes.c ${CMAKE_CURRENT_BINARY_DIR}/icon_bytes.h
|
||||
DEPENDS ${CMAKE_SOURCE_DIR}/icons/app.png
|
||||
)
|
||||
target_sources(BanjoRecompiled PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/icon_bytes.c)
|
||||
|
||||
message(STATUS "SDL2_FOUND = ${SDL2_FOUND}")
|
||||
message(STATUS "SDL2_INCLUDE_DIRS = ${SDL2_INCLUDE_DIRS}")
|
||||
|
||||
|
||||
+1
-1
Submodule lib/N64ModernRuntime updated: 8b3bae4cf3...494217848a
+1
-1
Submodule lib/RecompFrontend updated: 5f0b11a8d7...0f35fb46b1
+5
-1
@@ -106,9 +106,9 @@ ultramodern::input::connected_device_info_t get_connected_device_info(int contro
|
||||
};
|
||||
}
|
||||
|
||||
#if defined(__gnu_linux__)
|
||||
#include "icon_bytes.h"
|
||||
|
||||
#if defined(__gnu_linux__)
|
||||
bool SetImageAsIcon(const char* filename, SDL_Window* window)
|
||||
{
|
||||
// Read data
|
||||
@@ -371,10 +371,12 @@ std::vector<recomp::GameEntry> supported_games = {
|
||||
{
|
||||
.rom_hash = 0x1B67585D56E07F8CULL,
|
||||
.internal_name = "Banjo-Kazooie",
|
||||
.display_name = "Banjo-Kazooie",
|
||||
.game_id = u8"bk.n64.us.1.0",
|
||||
.mod_game_id = "bk",
|
||||
// Eep16k instead of Eep4k to have room for extra save file data.
|
||||
.save_type = recomp::SaveType::Eep16k,
|
||||
.thumbnail_bytes = std::span<const char>(icon_bytes),
|
||||
.is_enabled = false,
|
||||
.decompression_routine = banjo::decompress_bk,
|
||||
.has_compressed_code = true,
|
||||
@@ -571,6 +573,8 @@ void on_launcher_init(recompui::LauncherMenu *menu) {
|
||||
auto game_options_menu = menu->init_game_options_menu(
|
||||
supported_games[0].game_id,
|
||||
supported_games[0].mod_game_id,
|
||||
supported_games[0].display_name,
|
||||
supported_games[0].thumbnail_bytes,
|
||||
recompui::GameOptionsMenuLayout::Center
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user