diff --git a/Source/Core/Common/MemoryUtil.cpp b/Source/Core/Common/MemoryUtil.cpp index 0c079a15b3..2b1ed11d18 100644 --- a/Source/Core/Common/MemoryUtil.cpp +++ b/Source/Core/Common/MemoryUtil.cpp @@ -33,7 +33,7 @@ namespace Common { -#if !defined(_WIN32) +#if !defined(_WIN32) && defined(_M_X86_64) && !defined(MAP_32BIT) #include static uintptr_t RoundPage(uintptr_t addr) { diff --git a/Source/Core/Core/HW/BBA-TAP/TAP_Unix.cpp b/Source/Core/Core/HW/BBA-TAP/TAP_Unix.cpp index b1d4abc1b2..21cc08def0 100644 --- a/Source/Core/Core/HW/BBA-TAP/TAP_Unix.cpp +++ b/Source/Core/Core/HW/BBA-TAP/TAP_Unix.cpp @@ -122,6 +122,7 @@ bool CEXIETHERNET::SendFrame(const u8* frame, u32 size) #endif } +#ifdef __linux__ static void ReadThreadHandler(CEXIETHERNET* self) { while (!self->readThreadShutdown.IsSet()) @@ -150,6 +151,7 @@ static void ReadThreadHandler(CEXIETHERNET* self) } } } +#endif bool CEXIETHERNET::RecvInit() { diff --git a/Source/Core/Core/HW/DVDInterface.cpp b/Source/Core/Core/HW/DVDInterface.cpp index b87f3e88e2..34010422b6 100644 --- a/Source/Core/Core/HW/DVDInterface.cpp +++ b/Source/Core/Core/HW/DVDInterface.cpp @@ -344,8 +344,8 @@ static u32 AdvanceDTK(u32 maximum_samples, u32* samples_to_process) { if (s_audio_position >= s_current_start + s_current_length) { - DEBUG_LOG(DVDINTERFACE, "AdvanceDTK: NextStart=%08x, NextLength=%08x, " - "CurrentStart=%08x, CurrentLength=%08x, AudioPos=%08x", + DEBUG_LOG(DVDINTERFACE, "AdvanceDTK: NextStart=%08" PRIx64 ", NextLength=%08x, " + "CurrentStart=%08" PRIx64 ", CurrentLength=%08x, AudioPos=%08" PRIx64, s_next_start, s_next_length, s_current_start, s_current_length, s_audio_position); s_audio_position = s_next_start; @@ -1005,19 +1005,20 @@ void ExecuteCommand(u32 command_0, u32 command_1, u32 command_2, u32 output_addr switch (command_0 >> 16 & 0xFF) { case 0x00: // Returns streaming status - INFO_LOG(DVDINTERFACE, "(Audio): Stream Status: Request Audio status AudioPos:%08x/%08x " - "CurrentStart:%08x CurrentLength:%08x", + INFO_LOG(DVDINTERFACE, "(Audio): Stream Status: Request Audio status " + "AudioPos:%08" PRIx64 "/%08" PRIx64 " " + "CurrentStart:%08" PRIx64 " CurrentLength:%08x", s_audio_position, s_current_start + s_current_length, s_current_start, s_current_length); WriteImmediate(s_stream ? 1 : 0, output_address, reply_to_ios); break; case 0x01: // Returns the current offset - INFO_LOG(DVDINTERFACE, "(Audio): Stream Status: Request Audio status AudioPos:%08x", + INFO_LOG(DVDINTERFACE, "(Audio): Stream Status: Request Audio status AudioPos:%08" PRIx64, s_audio_position); WriteImmediate(static_cast(s_audio_position >> 2), output_address, reply_to_ios); break; case 0x02: // Returns the start offset - INFO_LOG(DVDINTERFACE, "(Audio): Stream Status: Request Audio status CurrentStart:%08x", + INFO_LOG(DVDINTERFACE, "(Audio): Stream Status: Request Audio status CurrentStart:%08" PRIx64, s_current_start); WriteImmediate(static_cast(s_current_start >> 2), output_address, reply_to_ios); break; diff --git a/Source/Core/DolphinWX/Frame.cpp b/Source/Core/DolphinWX/Frame.cpp index 0f2de902ce..2d528fc45f 100644 --- a/Source/Core/DolphinWX/Frame.cpp +++ b/Source/Core/DolphinWX/Frame.cpp @@ -292,6 +292,17 @@ static BOOL WINAPI s_ctrl_handler(DWORD fdwCtrlType) } #endif +#if defined(__unix__) || defined(__unix) || defined(__APPLE__) +static void SignalHandler(int) +{ + const char message[] = "A signal was received. A second signal will force Dolphin to stop.\n"; + if (write(STDERR_FILENO, message, sizeof(message)) < 0) + { + } + s_shutdown_signal_received.Set(); +} +#endif + CFrame::CFrame(wxFrame* parent, wxWindowID id, const wxString& title, wxRect geometry, bool use_debugger, bool batch_mode, bool show_log_window, long style) : CRenderFrame(parent, id, title, wxDefaultPosition, wxSize(800, 600), style), @@ -443,11 +454,7 @@ CFrame::CFrame(wxFrame* parent, wxWindowID id, const wxString& title, wxRect geo #if defined(__unix__) || defined(__unix) || defined(__APPLE__) struct sigaction sa; - sa.sa_handler = [](int unused) { - char message[] = "A signal was received. A second signal will force Dolphin to stop.\n"; - write(STDERR_FILENO, message, sizeof(message)); - s_shutdown_signal_received.Set(); - }; + sa.sa_handler = SignalHandler; sigemptyset(&sa.sa_mask); sa.sa_flags = SA_RESETHAND; sigaction(SIGINT, &sa, nullptr); diff --git a/Source/Core/InputCommon/ControllerInterface/evdev/evdev.cpp b/Source/Core/InputCommon/ControllerInterface/evdev/evdev.cpp index 08687332fb..d3f8f5fd36 100644 --- a/Source/Core/InputCommon/ControllerInterface/evdev/evdev.cpp +++ b/Source/Core/InputCommon/ControllerInterface/evdev/evdev.cpp @@ -131,7 +131,9 @@ static void StopHotplugThread() { // Write something to efd so that select() stops blocking. uint64_t value = 1; - write(s_wakeup_eventfd, &value, sizeof(uint64_t)); + if (write(s_wakeup_eventfd, &value, sizeof(uint64_t)) < 0) + { + } s_hotplug_thread.join(); } } @@ -404,7 +406,9 @@ void evdevDevice::ForceFeedback::SetState(ControlState state) play.code = m_id; play.value = 1; - write(m_fd, (const void*)&play, sizeof(play)); + if (write(m_fd, &play, sizeof(play)) < 0) + { + } } }