Compare commits

...

6 Commits

Author SHA1 Message Date
lizzie 0538d96031 2026-09-05 05:55:38
Signed-off-by: lizzie <lizzie@eden-emu.dev>
2026-09-05 05:55:38 +00:00
lizzie 904b4e77d6 2026-09-05 05:53:11
Signed-off-by: lizzie <lizzie@eden-emu.dev>
2026-09-05 05:53:11 +00:00
lizzie 0c2801b6d3 2026-09-04 23:59:41
Signed-off-by: lizzie <lizzie@eden-emu.dev>
2026-09-04 23:59:41 +00:00
lizzie ba82ca04d8 2026-09-04 23:57:52
Signed-off-by: lizzie <lizzie@eden-emu.dev>
2026-09-04 23:57:52 +00:00
xbzk 1dcc574591 [gdb] fix conn state to use same pipe (instead of a copy) (#4339)
- [x] I have read and followed the [Contribution Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/CONTRIBUTING.md#code-contributions).
- [x] I have read and followed the [AI Policy](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/AI.md)
- [x] I have read and followed the [Coding Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/Coding.md) to the best of my ability.

-------------------

I was trying to use GDB stub to investigate MHR and it was not connecting.
Error was suggesting it was not available for connection although i saw it booting on logs.
Debugged and noticed signal_pipe_ was not the correct one, and followed the example of client_socket_.
GDB stub is now working,  on windows, at least.

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4339
Reviewed-by: Lizzie and Samuel <lizzie@eden-emu.dev>
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
2026-09-02 14:04:35 +02:00
lizzie 5c20f244c9 [cmake] stop building OpenGL on Android (#4342)
Signed-off-by: lizzie <lizzie@eden-emu.dev>

- [x] I have read and followed the [Contribution Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/CONTRIBUTING.md#code-contributions).
- [x] I have read and followed the [AI Policy](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/AI.md)
- [x] I have read and followed the [Coding Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/Coding.md) to the best of my ability.

-------------------

we don't even support OpenGL on android

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4342
Reviewed-by: crueter <crueter@eden-emu.dev>
Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
2026-09-02 04:07:24 +02:00
9 changed files with 41 additions and 30 deletions
+1 -1
View File
@@ -238,7 +238,7 @@ option(YUZU_USE_BUNDLED_SIRIT "Download bundled sirit" ${BUNDLED_SIRIT_DEFAULT})
# FreeBSD 15+ has libusb, versions below should disable it # FreeBSD 15+ has libusb, versions below should disable it
cmake_dependent_option(ENABLE_LIBUSB "Enable the use of LibUSB" ON "WIN32 OR LINUX OR FREEBSD OR APPLE" OFF) cmake_dependent_option(ENABLE_LIBUSB "Enable the use of LibUSB" ON "WIN32 OR LINUX OR FREEBSD OR APPLE" OFF)
cmake_dependent_option(ENABLE_OPENGL "Enable OpenGL" ON "NOT (WIN32 AND ARCHITECTURE_arm64) AND NOT APPLE" OFF) cmake_dependent_option(ENABLE_OPENGL "Enable OpenGL" ON "NOT (WIN32 AND ARCHITECTURE_arm64) AND NOT APPLE AND NOT ANDROID" OFF)
mark_as_advanced(FORCE ENABLE_OPENGL) mark_as_advanced(FORCE ENABLE_OPENGL)
option(ENABLE_WEB_SERVICE "Enable web services (telemetry, etc.)" ON) option(ENABLE_WEB_SERVICE "Enable web services (telemetry, etc.)" ON)
+1 -1
View File
@@ -76,7 +76,7 @@ The following options are desktop only.
- `ENABLE_LIBUSB` (ON) Enable the use of the libusb input backend (HIGHLY RECOMMENDED) - `ENABLE_LIBUSB` (ON) Enable the use of the libusb input backend (HIGHLY RECOMMENDED)
- `ENABLE_OPENGL` (ON) Enable the OpenGL graphics backend - `ENABLE_OPENGL` (ON) Enable the OpenGL graphics backend
- Unavailable on Windows/ARM64 - Unavailable on Windows/ARM64 and on Android
- You probably shouldn't turn this off. - You probably shouldn't turn this off.
### Qt ### Qt
+1 -1
View File
@@ -358,7 +358,7 @@ private:
ConnectionState(boost::asio::ip::tcp::socket&& client_socket_, async_pipe signal_pipe_, Kernel::KernelCore& kernel) ConnectionState(boost::asio::ip::tcp::socket&& client_socket_, async_pipe signal_pipe_, Kernel::KernelCore& kernel)
: client_socket{std::move(client_socket_)} : client_socket{std::move(client_socket_)}
, signal_pipe{signal_pipe_} , signal_pipe{std::move(signal_pipe_)}
, active_thread{kernel, nullptr} , active_thread{kernel, nullptr}
{} {}
+3
View File
@@ -1021,6 +1021,9 @@ Result KProcess::Run(KernelCore& kernel, s32 priority, size_t stack_size) {
// Suspend for debug, if we should. // Suspend for debug, if we should.
if (kernel.System().DebuggerEnabled()) { if (kernel.System().DebuggerEnabled()) {
LOG_INFO(Debug_GDBStub,
"GDB stub enabled; suspending guest process until a debugger continues execution on port {}",
Settings::values.gdbstub_port.GetValue());
main_thread->RequestSuspend(kernel, SuspendType::Debug); main_thread->RequestSuspend(kernel, SuspendType::Debug);
} }
+11 -13
View File
@@ -4,17 +4,16 @@
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project // SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later // SPDX-License-Identifier: GPL-2.0-or-later
#include <thread> #include <chrono>
#include <fmt/ranges.h> #include <fmt/ranges.h>
#include <math.h> #include <math.h>
#include "common/param_package.h" #include "common/param_package.h"
#include "common/settings.h" #include "common/settings.h"
#include "common/thread.h" #include "common/steady_clock.h"
#include "input_common/drivers/mouse.h" #include "input_common/drivers/mouse.h"
namespace InputCommon { namespace InputCommon {
constexpr int update_time = 10;
constexpr float default_panning_sensitivity = 0.0010f; constexpr float default_panning_sensitivity = 0.0010f;
constexpr float default_stick_sensitivity = 0.0006f; constexpr float default_stick_sensitivity = 0.0006f;
constexpr float default_deadzone_counterweight = 0.01f; constexpr float default_deadzone_counterweight = 0.01f;
@@ -74,7 +73,7 @@ Mouse::Mouse(std::string input_engine_) : InputEngine(std::move(input_engine_))
last_motion_change = {}; last_motion_change = {};
} }
void Mouse::UpdateStickInput() { void Mouse::UpdateStickInput(Common::SteadyClock::time_point timestamp) {
if (!IsMousePanningEnabled()) { if (!IsMousePanningEnabled()) {
return; return;
} }
@@ -100,12 +99,9 @@ void Mouse::UpdateStickInput() {
last_mouse_change *= clamped_decay; last_mouse_change *= clamped_decay;
} }
void Mouse::UpdateMotionInput() { void Mouse::UpdateMotionInput(Common::SteadyClock::time_point timestamp) {
const float sensitivity = const float sensitivity = IsMousePanningEnabled() ? default_motion_panning_sensitivity : default_motion_sensitivity;
IsMousePanningEnabled() ? default_motion_panning_sensitivity : default_motion_sensitivity; const float rotation_velocity = std::sqrt(last_motion_change.x * last_motion_change.x + last_motion_change.y * last_motion_change.y);
const float rotation_velocity = std::sqrt(last_motion_change.x * last_motion_change.x +
last_motion_change.y * last_motion_change.y);
// Clamp rotation speed // Clamp rotation speed
if (rotation_velocity > maximum_rotation_speed / sensitivity) { if (rotation_velocity > maximum_rotation_speed / sensitivity) {
@@ -121,7 +117,7 @@ void Mouse::UpdateMotionInput() {
.accel_x = 0, .accel_x = 0,
.accel_y = 0, .accel_y = 0,
.accel_z = 0, .accel_z = 0,
.delta_timestamp = update_time * 1000, .delta_timestamp = u64(std::chrono::duration_cast<std::chrono::microseconds>(timestamp - last_notify_timestamp).count()),
}; };
if (IsMousePanningEnabled()) { if (IsMousePanningEnabled()) {
@@ -177,8 +173,10 @@ void Mouse::Move(int x, int y, int center_x, int center_y) {
} }
void Mouse::NotifyChanged() { void Mouse::NotifyChanged() {
UpdateStickInput(); auto const timestamp = Common::SteadyClock::Now();
UpdateMotionInput(); UpdateStickInput(timestamp);
UpdateMotionInput(timestamp);
last_notify_timestamp = Common::SteadyClock::Now();
} }
void Mouse::MouseMove(f32 touch_x, f32 touch_y) { void Mouse::MouseMove(f32 touch_x, f32 touch_y) {
+10 -7
View File
@@ -7,7 +7,9 @@
#pragma once #pragma once
#include <thread> #include <thread>
#include <chrono>
#include "common/steady_clock.h"
#include "common/polyfill_thread.h" #include "common/polyfill_thread.h"
#include "common/vector_math.h" #include "common/vector_math.h"
#include "input_common/input_engine.h" #include "input_common/input_engine.h"
@@ -101,17 +103,18 @@ public:
Common::Input::ButtonNames GetUIName(const Common::ParamPackage& params) const override; Common::Input::ButtonNames GetUIName(const Common::ParamPackage& params) const override;
private: private:
void UpdateStickInput(); void UpdateStickInput(Common::SteadyClock::time_point timestamp);
void UpdateMotionInput(); void UpdateMotionInput(Common::SteadyClock::time_point timestamp);
bool IsMousePanningEnabled(); bool IsMousePanningEnabled();
Common::Input::ButtonNames GetUIButtonName(const Common::ParamPackage& params) const; Common::Input::ButtonNames GetUIButtonName(const Common::ParamPackage& params) const;
Common::Vec2<int> mouse_origin; Common::Vec2<int> mouse_origin{};
Common::Vec2<int> last_mouse_position; Common::Vec2<int> last_mouse_position{};
Common::Vec2<float> last_mouse_change; Common::Vec2<float> last_mouse_change{};
Common::Vec3<float> last_motion_change; Common::Vec3<float> last_motion_change{};
Common::Vec2<int> wheel_position; Common::Vec2<int> wheel_position{};
Common::SteadyClock::time_point last_notify_timestamp{};
bool button_pressed = false; bool button_pressed = false;
}; };
+5 -7
View File
@@ -538,6 +538,7 @@ void GRenderWindow::mouseReleaseEvent(QMouseEvent* event) {
} }
void GRenderWindow::ConstrainMouse() { void GRenderWindow::ConstrainMouse() {
input_subsystem->GetMouse()->NotifyChanged(); // required to reset mouse once it's no longer moved
if (QtCommon::emu_thread == nullptr || !Settings::values.mouse_panning) { if (QtCommon::emu_thread == nullptr || !Settings::values.mouse_panning) {
mouse_constrain_timer.stop(); mouse_constrain_timer.stop();
return; return;
@@ -552,15 +553,12 @@ void GRenderWindow::ConstrainMouse() {
const auto pos = mapFromGlobal(QCursor::pos()); const auto pos = mapFromGlobal(QCursor::pos());
const int new_pos_x = std::clamp(pos.x(), 0, width()); const int new_pos_x = std::clamp(pos.x(), 0, width());
const int new_pos_y = std::clamp(pos.y(), 0, height()); const int new_pos_y = std::clamp(pos.y(), 0, height());
QCursor::setPos(mapToGlobal(QPoint{new_pos_x, new_pos_y})); QCursor::setPos(mapToGlobal(QPoint{new_pos_x, new_pos_y}));
return; } else {
const int center_x = width() / 2;
const int center_y = height() / 2;
QCursor::setPos(mapToGlobal(QPoint{center_x, center_y}));
} }
const int center_x = width() / 2;
const int center_y = height() / 2;
QCursor::setPos(mapToGlobal(QPoint{center_x, center_y}));
} }
void GRenderWindow::wheelEvent(QWheelEvent* event) { void GRenderWindow::wheelEvent(QWheelEvent* event) {
@@ -37,10 +37,16 @@ EmuWindow_SDL3::EmuWindow_SDL3(InputCommon::InputSubsystem* input_subsystem_, Co
SDL_SetWindowTitle(this_->render_window, title.c_str()); SDL_SetWindowTitle(this_->render_window, title.c_str());
return 2000; return 2000;
}, this); }, this);
mouse_timer = SDL_AddTimer(100, [](void *userdata, SDL_TimerID, Uint32) -> Uint32 {
auto* this_ = (EmuWindow_SDL3*)userdata;
this_->input_subsystem->GetMouse()->NotifyChanged();
return 100;
}, this);
} }
EmuWindow_SDL3::~EmuWindow_SDL3() { EmuWindow_SDL3::~EmuWindow_SDL3() {
SDL_RemoveTimer(titlebar_timer); SDL_RemoveTimer(titlebar_timer);
SDL_RemoveTimer(mouse_timer);
system.HIDCore().UnloadInputDevices(); system.HIDCore().UnloadInputDevices();
input_subsystem->Shutdown(); input_subsystem->Shutdown();
SDL_Quit(); SDL_Quit();
@@ -84,6 +84,9 @@ protected:
/// Periodic changer of titlebar (independent of event loop) /// Periodic changer of titlebar (independent of event loop)
SDL_TimerID titlebar_timer; SDL_TimerID titlebar_timer;
// Mouse resetter once it
SDL_TimerID mouse_timer;
/// Is the window still open? /// Is the window still open?
bool is_open = true; bool is_open = true;