mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-01-28 14:54:11 +00:00
Fix Apple Clang build
This commit is contained in:
parent
2b385f28f0
commit
0f682b7da1
@ -1,4 +1,7 @@
|
|||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wold-style-cast"
|
||||||
#import <Foundation/Foundation.h>
|
#import <Foundation/Foundation.h>
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
|
||||||
namespace Darwin_Version
|
namespace Darwin_Version
|
||||||
{
|
{
|
||||||
|
@ -24,8 +24,11 @@
|
|||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#define CHECK_IOCTRL_RET(res) if (res == -1) { gui_log.error("gui_pad_thread: ioctl failed (errno=%d=%s)", res, strerror(errno)); }
|
#define CHECK_IOCTRL_RET(res) if (res == -1) { gui_log.error("gui_pad_thread: ioctl failed (errno=%d=%s)", res, strerror(errno)); }
|
||||||
#elif defined(__APPLE__)
|
#elif defined(__APPLE__)
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wold-style-cast"
|
||||||
#include <ApplicationServices/ApplicationServices.h>
|
#include <ApplicationServices/ApplicationServices.h>
|
||||||
#include <Carbon/Carbon.h>
|
#include <Carbon/Carbon.h>
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
|
@ -4,7 +4,10 @@
|
|||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
||||||
#elif defined(__APPLE__)
|
#elif defined(__APPLE__)
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wold-style-cast"
|
||||||
#include <IOKit/pwr_mgt/IOPMLib.h>
|
#include <IOKit/pwr_mgt/IOPMLib.h>
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
|
||||||
static IOPMAssertionID s_pm_assertion = kIOPMNullAssertionID;
|
static IOPMAssertionID s_pm_assertion = kIOPMNullAssertionID;
|
||||||
|
|
||||||
@ -78,7 +81,11 @@ void disable_display_sleep()
|
|||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
SetThreadExecutionState(ES_CONTINUOUS | ES_SYSTEM_REQUIRED | ES_DISPLAY_REQUIRED);
|
SetThreadExecutionState(ES_CONTINUOUS | ES_SYSTEM_REQUIRED | ES_DISPLAY_REQUIRED);
|
||||||
#elif defined(__APPLE__)
|
#elif defined(__APPLE__)
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
// Necessary as some of those values are macro using old casts
|
||||||
|
#pragma GCC diagnostic ignored "-Wold-style-cast"
|
||||||
IOPMAssertionCreateWithName(kIOPMAssertionTypePreventUserIdleDisplaySleep, kIOPMAssertionLevelOn, CFSTR("Game running"), &s_pm_assertion);
|
IOPMAssertionCreateWithName(kIOPMAssertionTypePreventUserIdleDisplaySleep, kIOPMAssertionLevelOn, CFSTR("Game running"), &s_pm_assertion);
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
#elif defined(HAVE_QTDBUS)
|
#elif defined(HAVE_QTDBUS)
|
||||||
for (const char* service : { "org.freedesktop.ScreenSaver", "org.mate.ScreenSaver" })
|
for (const char* service : { "org.freedesktop.ScreenSaver", "org.mate.ScreenSaver" })
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user