Remove unused directory imports

This commit is contained in:
dcvz 2024-05-31 00:09:47 +02:00 committed by Angie
parent bb0cd42b42
commit 17a5ab9fce
5 changed files with 21 additions and 6 deletions

View file

@ -11,12 +11,6 @@
#include <mutex>
#include <array>
#ifdef _WIN32
#include <Shlobj.h>
#elif defined(__linux__)
#include <pwd.h>
#endif
#include "recomp.h"
#include "recomp_overlays.h"
#include "recomp_game.h"

View file

@ -52,6 +52,12 @@ namespace ultramodern {
Window window;
auto operator<=>(const WindowHandle&) const = default;
};
#elif defined(__APPLE__)
struct WindowHandle {
void* window;
void* view;
auto operator<=>(const WindowHandle&) const = default;
};
#endif
// We need a place in rdram to hold the PI handles, so pick an address in extended rdram

View file

@ -217,7 +217,11 @@ void task_thread_func(uint8_t* rdram, moodycamel::LightweightSemaphore* thread_r
if (!ultramodern::rsp::run_task(PASS_RDRAM task)) {
fprintf(stderr, "Failed to execute task type: %" PRIu32 "\n", task->t.type);
assert(false);
# ifdef __APPLE__
std::_Exit(EXIT_FAILURE);
# else
std::quick_exit(EXIT_FAILURE);
# endif
}
// Tell the game that the RSP has completed
@ -508,6 +512,8 @@ std::string get_graphics_api_name(ultramodern::GraphicsApi api) {
api = ultramodern::GraphicsApi::D3D12;
#elif defined(__gnu_linux__)
api = ultramodern::GraphicsApi::Vulkan;
#elif defined(__APPLE__)
api = ultramodern::GraphicsApi::Vulkan;
#else
static_assert(false && "Unimplemented")
#endif

View file

@ -129,6 +129,9 @@ ultramodern::RT64Context::RT64Context(uint8_t* rdram, ultramodern::WindowHandle
#elif defined(__linux__)
appCore.window.display = window_handle.display;
appCore.window.window = window_handle.window;
#elif defined(__APPLE__)
appCore.window.window = window_handle.window;
appCore.window.view = window_handle.view;
#endif
appCore.checkInterrupts = dummy_check_interrupts;

View file

@ -111,6 +111,12 @@ void ultramodern::set_native_thread_priority(ThreadPriority pri) {
// break;
// }
}
#elif defined(__APPLE__)
void ultramodern::set_native_thread_name(const std::string& name) {
pthread_setname_np(name.c_str());
}
void ultramodern::set_native_thread_priority(ThreadPriority pri) {}
#endif
std::atomic_int temporary_threads = 0;