mirror of
https://github.com/libretro/RetroArch.git
synced 2025-02-27 13:15:49 +00:00
(OSX PPC) Buildfixes
This commit is contained in:
parent
34c5d2ef07
commit
7c4329f31d
@ -23,7 +23,7 @@
|
|||||||
/* End PBXBuildFile section */
|
/* End PBXBuildFile section */
|
||||||
|
|
||||||
/* Begin PBXFileReference section */
|
/* Begin PBXFileReference section */
|
||||||
7A868DD21AC85A8500B0EDDB /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = OSX/en.lproj/MainMenu.xib; sourceTree = SOURCE_ROOT; };
|
7A868DD21AC85A8500B0EDDB /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = OSX/en.lproj/MainMenu_PPC.xib; sourceTree = SOURCE_ROOT; };
|
||||||
7A868DD41AC85A8500B0EDDB /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = OSX/en.lproj/Settings.xib; sourceTree = SOURCE_ROOT; };
|
7A868DD41AC85A8500B0EDDB /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = OSX/en.lproj/Settings.xib; sourceTree = SOURCE_ROOT; };
|
||||||
7ACC4C4F1AC864B800D67175 /* griffin_objc.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = griffin_objc.m; path = ../../griffin/griffin_objc.m; sourceTree = SOURCE_ROOT; };
|
7ACC4C4F1AC864B800D67175 /* griffin_objc.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = griffin_objc.m; path = ../../griffin/griffin_objc.m; sourceTree = SOURCE_ROOT; };
|
||||||
7AEFCD861921295E00FB5B6A /* griffin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = griffin.c; path = ../../griffin/griffin.c; sourceTree = SOURCE_ROOT; };
|
7AEFCD861921295E00FB5B6A /* griffin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = griffin.c; path = ../../griffin/griffin.c; sourceTree = SOURCE_ROOT; };
|
||||||
|
@ -23,6 +23,10 @@
|
|||||||
#include "cocoa_common.h"
|
#include "cocoa_common.h"
|
||||||
#include "../../ui_companion_driver.h"
|
#include "../../ui_companion_driver.h"
|
||||||
|
|
||||||
|
#ifndef NSEventMaskAny
|
||||||
|
#define NSEventMaskAny NSAnyEventMask
|
||||||
|
#endif
|
||||||
|
|
||||||
static void* ui_application_cocoa_initialize(void)
|
static void* ui_application_cocoa_initialize(void)
|
||||||
{
|
{
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -29,6 +29,18 @@ extern id apple_platform;
|
|||||||
|
|
||||||
#include "../../ui_companion_driver.h"
|
#include "../../ui_companion_driver.h"
|
||||||
|
|
||||||
|
#ifndef NSAlertStyleCritical
|
||||||
|
#define NSAlertStyleCritical NSCriticalAlertStyle
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef NSAlertStyleWarning
|
||||||
|
#define NSAlertStyleWarning NSWarningAlertStyle
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef NSAlertStyleInformational
|
||||||
|
#define NSAlertStyleInformational NSInformationalAlertStyle
|
||||||
|
#endif
|
||||||
|
|
||||||
static enum ui_msg_window_response ui_msg_window_cocoa_dialog(ui_msg_window_state *state, enum ui_msg_window_type type)
|
static enum ui_msg_window_response ui_msg_window_cocoa_dialog(ui_msg_window_state *state, enum ui_msg_window_type type)
|
||||||
{
|
{
|
||||||
#if defined(HAVE_COCOA_METAL)
|
#if defined(HAVE_COCOA_METAL)
|
||||||
|
@ -105,6 +105,67 @@ static void app_terminate(void)
|
|||||||
@implementation RApplication
|
@implementation RApplication
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef NSEventModifierFlagCapsLock
|
||||||
|
#define NSEventModifierFlagCapsLock NSAlphaShiftKeyMask
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef NSEventModifierFlagShift
|
||||||
|
#define NSEventModifierFlagShift NSShiftKeyMask
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef NSEventModifierFlagControl
|
||||||
|
#define NSEventModifierFlagControl NSControlKeyMask
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef NSEventModifierFlagOption
|
||||||
|
#define NSEventModifierFlagOption NSAlternateKeyMask
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef NSEventModifierFlagCommand
|
||||||
|
#define NSEventModifierFlagCommand NSCommandKeyMask
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef NSEventModifierFlagNumericPad
|
||||||
|
#define NSEventModifierFlagNumericPad NSNumericPadKeyMask
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef NSEventTypeKeyDown
|
||||||
|
#define NSEventTypeKeyDown NSKeyDown
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef NSEventTypeKeyUp
|
||||||
|
#define NSEventTypeKeyUp NSKeyUp
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef NSEventTypeLeftMouseDragged
|
||||||
|
#define NSEventTypeLeftMouseDragged NSLeftMouseDragged
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef NSEventTypeRightMouseDragged
|
||||||
|
#define NSEventTypeRightMouseDragged NSRightMouseDragged
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef NSEventTypeOtherMouseDragged
|
||||||
|
#define NSEventTypeOtherMouseDragged NSOtherMouseDragged
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef NSEventTypeMouseMoved
|
||||||
|
#define NSEventTypeMouseMoved NSMouseMoved
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef NSEventTypeLeftMouseUp
|
||||||
|
#define NSEventTypeLeftMouseUp NSLeftMouseUp
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef NSEventTypeRightMouseUp
|
||||||
|
#define NSEventTypeRightMouseUp NSRightMouseUp
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef NSEventTypeOtherMouseUp
|
||||||
|
#define NSEventTypeOtherMouseUp NSOtherMouseUp
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
- (void)sendEvent:(NSEvent *)event {
|
- (void)sendEvent:(NSEvent *)event {
|
||||||
[super sendEvent:event];
|
[super sendEvent:event];
|
||||||
|
|
||||||
@ -113,17 +174,12 @@ static void app_terminate(void)
|
|||||||
|
|
||||||
switch ((int32_t)event_type)
|
switch ((int32_t)event_type)
|
||||||
{
|
{
|
||||||
#if defined(HAVE_COCOA_METAL)
|
|
||||||
case NSEventTypeKeyDown:
|
case NSEventTypeKeyDown:
|
||||||
case NSEventTypeKeyUp:
|
case NSEventTypeKeyUp:
|
||||||
#elif defined(HAVE_COCOA)
|
|
||||||
case NSKeyDown:
|
|
||||||
case NSKeyUp:
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
NSString* ch = event.characters;
|
NSString* ch = event.characters;
|
||||||
uint32_t character = 0;
|
uint32_t character = 0;
|
||||||
uint32_t mod = 0;
|
uint32_t mod = 0;
|
||||||
|
|
||||||
if (ch && ch.length != 0)
|
if (ch && ch.length != 0)
|
||||||
{
|
{
|
||||||
@ -168,23 +224,19 @@ static void app_terminate(void)
|
|||||||
0, event.modifierFlags, RETRO_DEVICE_KEYBOARD);
|
0, event.modifierFlags, RETRO_DEVICE_KEYBOARD);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#if defined(HAVE_COCOA_METAL)
|
|
||||||
case NSEventTypeMouseMoved:
|
case NSEventTypeMouseMoved:
|
||||||
case NSEventTypeLeftMouseDragged:
|
case NSEventTypeLeftMouseDragged:
|
||||||
case NSEventTypeRightMouseDragged:
|
case NSEventTypeRightMouseDragged:
|
||||||
case NSEventTypeOtherMouseDragged:
|
case NSEventTypeOtherMouseDragged:
|
||||||
#elif defined(HAVE_COCOA)
|
|
||||||
case NSMouseMoved:
|
|
||||||
case NSLeftMouseDragged:
|
|
||||||
case NSRightMouseDragged:
|
|
||||||
case NSOtherMouseDragged:
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
NSPoint pos;
|
NSPoint pos;
|
||||||
NSPoint mouse_pos;
|
NSPoint mouse_pos;
|
||||||
apple = (cocoa_input_data_t*)input_driver_get_data();
|
apple = (cocoa_input_data_t*)input_driver_get_data();
|
||||||
if (!apple)
|
if (!apple)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
pos.x = 0;
|
||||||
|
pos.y = 0;
|
||||||
|
|
||||||
/* Relative */
|
/* Relative */
|
||||||
apple->mouse_rel_x = (int16_t)event.deltaX;
|
apple->mouse_rel_x = (int16_t)event.deltaX;
|
||||||
@ -214,29 +266,6 @@ static void app_terminate(void)
|
|||||||
#endif
|
#endif
|
||||||
/* TODO/FIXME - properly implement. */
|
/* TODO/FIXME - properly implement. */
|
||||||
break;
|
break;
|
||||||
#if defined(HAVE_COCOA_METAL)
|
|
||||||
case NSEventTypeLeftMouseDown:
|
|
||||||
case NSEventTypeRightMouseDown:
|
|
||||||
case NSEventTypeOtherMouseDown:
|
|
||||||
#elif defined(HAVE_COCOA)
|
|
||||||
case NSLeftMouseDown:
|
|
||||||
case NSRightMouseDown:
|
|
||||||
case NSOtherMouseDown:
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
#if defined(HAVE_COCOA_METAL)
|
|
||||||
NSPoint pos = [apple_platform.renderView convertPoint:[event locationInWindow] fromView:nil];
|
|
||||||
#elif defined(HAVE_COCOA)
|
|
||||||
NSPoint pos = [[CocoaView get] convertPoint:[event locationInWindow] fromView:nil];
|
|
||||||
#endif
|
|
||||||
apple = (cocoa_input_data_t*)input_driver_get_data();
|
|
||||||
if (!apple || pos.y < 0)
|
|
||||||
return;
|
|
||||||
apple->mouse_buttons |= 1 << event.buttonNumber;
|
|
||||||
|
|
||||||
apple->touch_count = 1;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case NSEventTypeLeftMouseUp:
|
case NSEventTypeLeftMouseUp:
|
||||||
case NSEventTypeRightMouseUp:
|
case NSEventTypeRightMouseUp:
|
||||||
case NSEventTypeOtherMouseUp:
|
case NSEventTypeOtherMouseUp:
|
||||||
@ -499,11 +528,11 @@ static char** waiting_argv;
|
|||||||
|
|
||||||
- (void)application:(NSApplication *)sender openFiles:(NSArray *)filenames
|
- (void)application:(NSApplication *)sender openFiles:(NSArray *)filenames
|
||||||
{
|
{
|
||||||
if (filenames.count == 1 && filenames[0])
|
if ((filenames.count == 1) && [filenames objectAtIndex:0])
|
||||||
{
|
{
|
||||||
struct retro_system_info *system = runloop_get_libretro_system_info();
|
struct retro_system_info *system = runloop_get_libretro_system_info();
|
||||||
NSString *__core = filenames[0];
|
NSString *__core = [filenames objectAtIndex:0];
|
||||||
const char *core_name = system ? system->library_name : NULL;
|
const char *core_name = system->library_name;
|
||||||
|
|
||||||
if (core_name)
|
if (core_name)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user