address review comments

This commit is contained in:
patchzyy
2026-10-20 02:24:56 +02:00
parent fd5e0331bd
commit 0d0ae2d8f7
4 changed files with 9 additions and 5 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ void NandQueueIosCallback(uint32_t callbackPtr, int32_t result, uint32_t callbac
namespace BluetoothUsb {
constexpr const char* kDevicePath = "/dev/usb/oh1/57e/305";
constexpr int32_t kDeviceFd = 0x30001;
constexpr int32_t kDeviceFd = 5;
constexpr int32_t kIpcSuccess = 0;
constexpr int32_t kIpcEinval = -4;
+3
View File
@@ -1493,6 +1493,7 @@ int RuntimeMain(int argc, char** argv) {
// Shutdown fiber system
Fiber::GuestFiberManager::Shutdown();
WindowPlacementPersistence::Flush(true);
Wiimote::Shutdown();
aurora_shutdown();
DiscordPresence::Shutdown();
SetRuntimeExitCodeImpl(0);
@@ -1511,6 +1512,7 @@ int RuntimeMain(int argc, char** argv) {
SetRuntimeExitCodeImpl(1);
Fiber::GuestFiberManager::Shutdown();
WindowPlacementPersistence::Flush(true);
Wiimote::Shutdown();
aurora_shutdown();
DiscordPresence::Shutdown();
ShutdownProcessTranscript();
@@ -1523,6 +1525,7 @@ int RuntimeMain(int argc, char** argv) {
SetRuntimeExitCodeImpl(1);
Fiber::GuestFiberManager::Shutdown();
WindowPlacementPersistence::Flush(true);
Wiimote::Shutdown();
aurora_shutdown();
DiscordPresence::Shutdown();
ShutdownProcessTranscript();
+1 -1
View File
@@ -369,7 +369,7 @@ void DrawWiiRemoteSetup() {
ImGui::SetTooltip("Takes effect the next time the game starts.");
}
ImGui::SetNextItemWidth(160.0f);
if (ImGui::SliderInt("Pointer sensitivity", &g_wiiIrSensitivity, 1, 5)) {
if (ImGui::SliderInt("Pointer sensitivity", &g_wiiIrSensitivity, 1, 5, "%d", ImGuiSliderFlags_AlwaysClamp)) {
RuntimeConfigFile::SetWiiIrSensitivity(g_wiiIrSensitivity);
}
if (ImGui::IsItemHovered()) {
+4 -3
View File
@@ -51,13 +51,14 @@ void ExtensionState::Reset() {
void ExtensionState::ObserveOutput(const uint8_t* report, size_t size) {
using namespace ExtensionDetail;
if (size < 6 || (report[1] & 0x04) == 0) return;
if (size < 6) return;
const bool registerSpace = (report[1] & 0x04) != 0;
const uint32_t address = (report[2] << 16) | (report[3] << 8) | report[4];
if (report[0] == kReportReadMemory) {
m_readAddress = address;
m_readAddress = registerSpace ? address : 0;
return;
}
if (report[0] != kReportWriteMemory || !InExtensionSpace(address)) return;
if (!registerSpace || report[0] != kReportWriteMemory || !InExtensionSpace(address)) return;
const size_t length = std::min<size_t>(report[5], size - 6);
bool keyChanged = false;
for (size_t i = 0; i < length; ++i) {