mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-05-28 12:47:04 +02:00
random fixes
This commit is contained in:
parent
a9cb1f9194
commit
aa8d71719c
4 changed files with 16 additions and 11 deletions
|
|
@ -37,7 +37,7 @@ EOF
|
||||||
# Normally a platform has a package manager
|
# Normally a platform has a package manager
|
||||||
# PS4 does not, atleast not in the normal sense
|
# PS4 does not, atleast not in the normal sense
|
||||||
export EXTRA_CMAKE_FLAGS=("${EXTRA_CMAKE_FLAGS[@]}" $@)
|
export EXTRA_CMAKE_FLAGS=("${EXTRA_CMAKE_FLAGS[@]}" $@)
|
||||||
cmake -S . -B build -G "Unix Makefiles" \
|
[ -f "build/Makefile" ] || cmake -S . -B build -G "Unix Makefiles" \
|
||||||
-DCMAKE_TOOLCHAIN_FILE="ps4-toolchain.cmake" \
|
-DCMAKE_TOOLCHAIN_FILE="ps4-toolchain.cmake" \
|
||||||
-DENABLE_QT_TRANSLATION=OFF \
|
-DENABLE_QT_TRANSLATION=OFF \
|
||||||
-DENABLE_CUBEB=OFF \
|
-DENABLE_CUBEB=OFF \
|
||||||
|
|
|
||||||
|
|
@ -160,6 +160,7 @@ struct InputSubsystem::Impl {
|
||||||
#ifndef __OPENORBIS__
|
#ifndef __OPENORBIS__
|
||||||
auto udp_devices = udp_client->GetInputDevices();
|
auto udp_devices = udp_client->GetInputDevices();
|
||||||
devices.insert(devices.end(), udp_devices.begin(), udp_devices.end());
|
devices.insert(devices.end(), udp_devices.begin(), udp_devices.end());
|
||||||
|
#endif
|
||||||
#ifdef HAVE_SDL3
|
#ifdef HAVE_SDL3
|
||||||
auto joycon_devices = joycon->GetInputDevices();
|
auto joycon_devices = joycon->GetInputDevices();
|
||||||
devices.insert(devices.end(), joycon_devices.begin(), joycon_devices.end());
|
devices.insert(devices.end(), joycon_devices.begin(), joycon_devices.end());
|
||||||
|
|
@ -196,6 +197,7 @@ struct InputSubsystem::Impl {
|
||||||
if (engine == udp_client->GetEngineName()) {
|
if (engine == udp_client->GetEngineName()) {
|
||||||
return udp_client;
|
return udp_client;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
#ifdef HAVE_SDL3
|
#ifdef HAVE_SDL3
|
||||||
if (engine == sdl->GetEngineName()) {
|
if (engine == sdl->GetEngineName()) {
|
||||||
return sdl;
|
return sdl;
|
||||||
|
|
@ -311,6 +313,7 @@ struct InputSubsystem::Impl {
|
||||||
#endif
|
#endif
|
||||||
#ifndef __OPENORBIS__
|
#ifndef __OPENORBIS__
|
||||||
udp_client->BeginConfiguration();
|
udp_client->BeginConfiguration();
|
||||||
|
#endif
|
||||||
#ifdef HAVE_SDL3
|
#ifdef HAVE_SDL3
|
||||||
sdl->BeginConfiguration();
|
sdl->BeginConfiguration();
|
||||||
joycon->BeginConfiguration();
|
joycon->BeginConfiguration();
|
||||||
|
|
@ -328,6 +331,7 @@ struct InputSubsystem::Impl {
|
||||||
#endif
|
#endif
|
||||||
#ifndef __OPENORBIS__
|
#ifndef __OPENORBIS__
|
||||||
udp_client->EndConfiguration();
|
udp_client->EndConfiguration();
|
||||||
|
#endif
|
||||||
#ifdef HAVE_SDL3
|
#ifdef HAVE_SDL3
|
||||||
sdl->EndConfiguration();
|
sdl->EndConfiguration();
|
||||||
joycon->EndConfiguration();
|
joycon->EndConfiguration();
|
||||||
|
|
|
||||||
|
|
@ -165,11 +165,11 @@ void EmuWindow_SDL3::Fullscreen() {
|
||||||
|
|
||||||
void EmuWindow_SDL3::WaitEvent() {
|
void EmuWindow_SDL3::WaitEvent() {
|
||||||
// Called on main thread
|
// Called on main thread
|
||||||
SDL_Event event;
|
SDL_Event event{};
|
||||||
|
|
||||||
if (!SDL_WaitEvent(&event)) {
|
if (!SDL_WaitEventTimeout(&event, -1)) {
|
||||||
const char* error = SDL_GetError();
|
const char* error = SDL_GetError();
|
||||||
if (!error || strcmp(error, "") == 0) {
|
if (!error || strlen(error) == 0) {
|
||||||
// https://github.com/libsdl-org/SDL/issues/5780
|
// https://github.com/libsdl-org/SDL/issues/5780
|
||||||
// Sometimes SDL will return without actually having hit an error condition;
|
// Sometimes SDL will return without actually having hit an error condition;
|
||||||
// just ignore it in this case.
|
// just ignore it in this case.
|
||||||
|
|
@ -236,12 +236,7 @@ void EmuWindow_SDL3::WaitEvent() {
|
||||||
const u32 current_time = SDL_GetTicks();
|
const u32 current_time = SDL_GetTicks();
|
||||||
if (current_time > last_time + 2000) {
|
if (current_time > last_time + 2000) {
|
||||||
const auto results = system.GetAndResetPerfStats();
|
const auto results = system.GetAndResetPerfStats();
|
||||||
const auto title = fmt::format("{} | {}-{} | FPS: {:.0f} ({:.0f}%)",
|
const auto title = fmt::format("{} | {}-{} | FPS: {:.0f} ({:.0f}%)", Common::g_build_fullname, Common::g_scm_branch, Common::g_scm_desc, results.average_game_fps, results.emulation_speed * 100.0);
|
||||||
Common::g_build_fullname,
|
|
||||||
Common::g_scm_branch,
|
|
||||||
Common::g_scm_desc,
|
|
||||||
results.average_game_fps,
|
|
||||||
results.emulation_speed * 100.0);
|
|
||||||
SDL_SetWindowTitle(render_window, title.c_str());
|
SDL_SetWindowTitle(render_window, title.c_str());
|
||||||
last_time = current_time;
|
last_time = current_time;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -220,13 +220,19 @@ int main(int argc, char** argv) {
|
||||||
std::optional<int> selected_user{};
|
std::optional<int> selected_user{};
|
||||||
std::optional<u16> override_gdb_port{};
|
std::optional<u16> override_gdb_port{};
|
||||||
bool use_multiplayer = false;
|
bool use_multiplayer = false;
|
||||||
bool fullscreen = false;
|
|
||||||
std::string nickname{};
|
std::string nickname{};
|
||||||
std::string password{};
|
std::string password{};
|
||||||
std::string address{};
|
std::string address{};
|
||||||
std::string input_profile{};
|
std::string input_profile{};
|
||||||
u16 port = Network::DefaultRoomPort;
|
u16 port = Network::DefaultRoomPort;
|
||||||
|
|
||||||
|
// Platforms that start with fullscreen
|
||||||
|
#if defined(__OPENORBIS__) || defined(__ANDROID__)
|
||||||
|
bool fullscreen = true;
|
||||||
|
#else
|
||||||
|
bool fullscreen = false;
|
||||||
|
#endif
|
||||||
|
|
||||||
static struct option long_options[] = {
|
static struct option long_options[] = {
|
||||||
// clang-format off
|
// clang-format off
|
||||||
{"debug", no_argument, 0, 'd'},
|
{"debug", no_argument, 0, 'd'},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue