mirror of
https://github.com/Zelda64Recomp/Zelda64Recomp.git
synced 2026-04-27 20:51:40 +00:00
Merge branch 'live-recomp' into reset-game-from-menu-PLUS-live-recomp
This commit is contained in:
commit
ba06b399eb
9 changed files with 26 additions and 29 deletions
2
.github/workflows/validate.yml
vendored
2
.github/workflows/validate.yml
vendored
|
|
@ -9,7 +9,7 @@ on:
|
|||
N64RECOMP_COMMIT:
|
||||
type: string
|
||||
required: false
|
||||
default: 'd33d38161798167929b114c2b0fd445f9670e10a'
|
||||
default: 'fc696046da3e703450559154d9370ca74c197f8b'
|
||||
DXC_CHECKSUM:
|
||||
type: string
|
||||
required: false
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ if (WIN32)
|
|||
endif()
|
||||
|
||||
set(RT64_STATIC TRUE)
|
||||
set(RT64_SDL_WINDOW_VULKAN TRUE)
|
||||
add_subdirectory(${CMAKE_SOURCE_DIR}/lib/rt64 ${CMAKE_BINARY_DIR}/rt64)
|
||||
|
||||
# set(BUILD_SHARED_LIBS_SAVED "${BUILD_SHARED_LIBS}")
|
||||
|
|
@ -57,6 +58,7 @@ target_include_directories(RecompiledFuncs PRIVATE
|
|||
${CMAKE_SOURCE_DIR}/include
|
||||
${CMAKE_SOURCE_DIR}/lib/N64ModernRuntime/ultramodern/include
|
||||
${CMAKE_SOURCE_DIR}/lib/N64ModernRuntime/librecomp/include
|
||||
${CMAKE_SOURCE_DIR}/lib/N64ModernRuntime/N64Recomp/include
|
||||
)
|
||||
|
||||
file(GLOB FUNC_C_SOURCES ${CMAKE_SOURCE_DIR}/RecompiledFuncs/*.c)
|
||||
|
|
@ -78,6 +80,7 @@ target_include_directories(PatchesLib PRIVATE
|
|||
${CMAKE_SOURCE_DIR}/include
|
||||
${CMAKE_SOURCE_DIR}/lib/N64ModernRuntime/ultramodern/include
|
||||
${CMAKE_SOURCE_DIR}/lib/N64ModernRuntime/librecomp/include
|
||||
${CMAKE_SOURCE_DIR}/lib/N64ModernRuntime/N64Recomp/include
|
||||
)
|
||||
|
||||
target_sources(PatchesLib PRIVATE
|
||||
|
|
@ -96,12 +99,8 @@ if(NOT DEFINED PATCHES_LD)
|
|||
set(PATCHES_LD ld.lld)
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED PATCHES_OBJCOPY)
|
||||
set(PATCHES_OBJCOPY llvm-objcopy)
|
||||
endif()
|
||||
|
||||
add_custom_target(PatchesBin
|
||||
COMMAND ${CMAKE_COMMAND} -E env CC=${PATCHES_C_COMPILER} LD=${PATCHES_LD} OBJCOPY=${PATCHES_OBJCOPY} make
|
||||
COMMAND ${CMAKE_COMMAND} -E env CC=${PATCHES_C_COMPILER} LD=${PATCHES_LD} make
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/patches
|
||||
BYPRODUCTS ${CMAKE_SOURCE_DIR}/patches/patches.elf
|
||||
)
|
||||
|
|
@ -166,6 +165,7 @@ set (SOURCES
|
|||
|
||||
target_include_directories(Zelda64Recompiled PRIVATE
|
||||
${CMAKE_SOURCE_DIR}/include
|
||||
${CMAKE_SOURCE_DIR}/lib/N64ModernRuntime/N64Recomp/include
|
||||
${CMAKE_SOURCE_DIR}/lib/concurrentqueue
|
||||
${CMAKE_SOURCE_DIR}/lib/GamepadMotionHelpers
|
||||
${CMAKE_SOURCE_DIR}/lib/RmlUi/Include
|
||||
|
|
@ -247,6 +247,8 @@ if (CMAKE_SYSTEM_NAME MATCHES "Linux")
|
|||
find_package(SDL2 REQUIRED)
|
||||
find_package(X11 REQUIRED)
|
||||
|
||||
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/512.png icon_bytes ${CMAKE_CURRENT_BINARY_DIR}/icon_bytes.c ${CMAKE_CURRENT_BINARY_DIR}/icon_bytes.h
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit d5c81d0a6bf2e5f36747a095a7a060d7623bbf58
|
||||
Subproject commit 43790db072e0e599cc14860c215d79569387a3ed
|
||||
2
lib/rt64
2
lib/rt64
|
|
@ -1 +1 @@
|
|||
Subproject commit 67422c3b647058d3d38f2813a2abe79cf1638f13
|
||||
Subproject commit 0ca92eeb6c2f58ce3581c65f87f7261b8ac0fea0
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
#ifdef MIPS
|
||||
#include "ultra64.h"
|
||||
#else
|
||||
#include "librecomp/recomp.h"
|
||||
#include "recomp.h"
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
#include <mutex>
|
||||
|
||||
#include "ultramodern/ultramodern.hpp"
|
||||
#include "librecomp/recomp.h"
|
||||
#include "recomp.h"
|
||||
#include "recomp_input.h"
|
||||
#include "zelda_config.h"
|
||||
#include "recomp_ui.h"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#include <cmath>
|
||||
#include <iostream>
|
||||
|
||||
#include "librecomp/recomp.h"
|
||||
#include "recomp.h"
|
||||
#include "librecomp/overlays.hpp"
|
||||
#include "zelda_config.h"
|
||||
#include "zelda_game.h"
|
||||
|
|
|
|||
|
|
@ -55,14 +55,12 @@ ultramodern::gfx_callbacks_t::gfx_data_t create_gfx() {
|
|||
SDL_SetHint(SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH, "1");
|
||||
SDL_SetHint(SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS, "1");
|
||||
|
||||
#if defined(__linux__)
|
||||
SDL_SetHint(SDL_HINT_VIDEODRIVER, "x11");
|
||||
#endif
|
||||
|
||||
if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_GAMECONTROLLER) > 0) {
|
||||
exit_error("Failed to initialize SDL2: %s\n", SDL_GetError());
|
||||
}
|
||||
|
||||
fprintf(stdout, "SDL Video Driver: %s\n", SDL_GetCurrentVideoDriver());
|
||||
|
||||
return {};
|
||||
}
|
||||
|
||||
|
|
@ -118,7 +116,13 @@ bool SetImageAsIcon(const char* filename, SDL_Window* window)
|
|||
SDL_Window* window;
|
||||
|
||||
ultramodern::renderer::WindowHandle create_window(ultramodern::gfx_callbacks_t::gfx_data_t) {
|
||||
window = SDL_CreateWindow("Zelda 64: Recompiled", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 1600, 960, SDL_WINDOW_RESIZABLE );
|
||||
uint32_t flags = SDL_WINDOW_RESIZABLE;
|
||||
|
||||
#if defined(RT64_SDL_WINDOW_VULKAN)
|
||||
flags |= SDL_WINDOW_VULKAN;
|
||||
#endif
|
||||
|
||||
window = SDL_CreateWindow("Zelda 64: Recompiled", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 1600, 960, flags);
|
||||
#if defined(__linux__)
|
||||
SetImageAsIcon("icons/512.png",window);
|
||||
if (ultramodern::renderer::get_graphics_config().wm_option == ultramodern::renderer::WindowMode::Fullscreen) { // TODO: Remove once RT64 gets native fullscreen support on Linux
|
||||
|
|
@ -138,14 +142,8 @@ ultramodern::renderer::WindowHandle create_window(ultramodern::gfx_callbacks_t::
|
|||
|
||||
#if defined(_WIN32)
|
||||
return ultramodern::renderer::WindowHandle{ wmInfo.info.win.window, GetCurrentThreadId() };
|
||||
#elif defined(__ANDROID__)
|
||||
static_assert(false && "Unimplemented");
|
||||
#elif defined(__linux__)
|
||||
if (wmInfo.subsystem != SDL_SYSWM_X11) {
|
||||
exit_error("Unsupported SDL2 video driver \"%s\". Only X11 is supported on Linux.\n", SDL_GetCurrentVideoDriver());
|
||||
}
|
||||
|
||||
return ultramodern::renderer::WindowHandle{ wmInfo.info.x11.display, wmInfo.info.x11.window };
|
||||
#elif defined(__linux__) || defined(__ANDROID__)
|
||||
return ultramodern::renderer::WindowHandle{ window };
|
||||
#else
|
||||
static_assert(false && "Unimplemented");
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -200,11 +200,8 @@ zelda64::renderer::RT64Context::RT64Context(uint8_t* rdram, ultramodern::rendere
|
|||
RT64::Application::Core appCore{};
|
||||
#if defined(_WIN32)
|
||||
appCore.window = window_handle.window;
|
||||
#elif defined(__ANDROID__)
|
||||
assert(false && "Unimplemented");
|
||||
#elif defined(__linux__)
|
||||
appCore.window.display = window_handle.display;
|
||||
appCore.window.window = window_handle.window;
|
||||
#elif defined(__linux__) || defined(__ANDROID__)
|
||||
appCore.window = window_handle;
|
||||
#elif defined(__APPLE__)
|
||||
appCore.window.window = window_handle.window;
|
||||
appCore.window.view = window_handle.view;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue