mirror of
https://github.com/libretro/RetroArch
synced 2025-04-09 21:45:45 +00:00
(Cocoa) small style nits; don't use NSLog
This commit is contained in:
parent
18639cca6e
commit
46c2a9b950
@ -174,11 +174,10 @@ void *glkitview_init(void);
|
|||||||
#ifdef HAVE_IOS_CUSTOMKEYBOARD
|
#ifdef HAVE_IOS_CUSTOMKEYBOARD
|
||||||
int cmdData = self.keyboardController.view.isHidden ? 0 : 1;
|
int cmdData = self.keyboardController.view.isHidden ? 0 : 1;
|
||||||
command_event(CMD_EVENT_GAME_FOCUS_TOGGLE, &cmdData);
|
command_event(CMD_EVENT_GAME_FOCUS_TOGGLE, &cmdData);
|
||||||
if ( self.keyboardController.view.isHidden ) {
|
if (self.keyboardController.view.isHidden)
|
||||||
command_event(CMD_EVENT_OVERLAY_INIT, NULL);
|
command_event(CMD_EVENT_OVERLAY_INIT, NULL);
|
||||||
} else {
|
else
|
||||||
command_event(CMD_EVENT_OVERLAY_DEINIT, NULL);
|
command_event(CMD_EVENT_OVERLAY_DEINIT, NULL);
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -353,24 +352,23 @@ void *glkitview_init(void);
|
|||||||
|
|
||||||
#pragma mark EmulatorTouchMouseHandlerDelegate
|
#pragma mark EmulatorTouchMouseHandlerDelegate
|
||||||
|
|
||||||
-(void)handleMouseClickWithIsLeftClick:(BOOL)isLeftClick isPressed:(BOOL)isPressed {
|
-(void)handleMouseClickWithIsLeftClick:(BOOL)isLeftClick isPressed:(BOOL)isPressed
|
||||||
|
{
|
||||||
cocoa_input_data_t *apple = (cocoa_input_data_t*) input_state_get_ptr()->current_data;
|
cocoa_input_data_t *apple = (cocoa_input_data_t*) input_state_get_ptr()->current_data;
|
||||||
if (apple == NULL) {
|
if (!apple)
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
NSUInteger buttonIndex = isLeftClick ? 0 : 1;
|
NSUInteger buttonIndex = isLeftClick ? 0 : 1;
|
||||||
if (isPressed) {
|
if (isPressed)
|
||||||
apple->mouse_buttons |= (1 << buttonIndex);
|
apple->mouse_buttons |= (1 << buttonIndex);
|
||||||
} else {
|
else
|
||||||
apple->mouse_buttons &= ~(1 << buttonIndex);
|
apple->mouse_buttons &= ~(1 << buttonIndex);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
-(void)handleMouseMoveWithX:(CGFloat)x y:(CGFloat)y {
|
-(void)handleMouseMoveWithX:(CGFloat)x y:(CGFloat)y
|
||||||
|
{
|
||||||
cocoa_input_data_t *apple = (cocoa_input_data_t*) input_state_get_ptr()->current_data;
|
cocoa_input_data_t *apple = (cocoa_input_data_t*) input_state_get_ptr()->current_data;
|
||||||
if (apple == NULL) {
|
if (!apple)
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
apple->mouse_rel_x = (int16_t)x;
|
apple->mouse_rel_x = (int16_t)x;
|
||||||
apple->mouse_rel_y = (int16_t)y;
|
apple->mouse_rel_y = (int16_t)y;
|
||||||
}
|
}
|
||||||
|
@ -33,6 +33,7 @@
|
|||||||
#include "../../input/drivers/cocoa_input.h"
|
#include "../../input/drivers/cocoa_input.h"
|
||||||
#include "../../input/drivers_keyboard/keyboard_event_apple.h"
|
#include "../../input/drivers_keyboard/keyboard_event_apple.h"
|
||||||
#include "../../retroarch.h"
|
#include "../../retroarch.h"
|
||||||
|
#include "../../verbosity.h"
|
||||||
|
|
||||||
#ifdef HAVE_MENU
|
#ifdef HAVE_MENU
|
||||||
#include "../../menu/menu_setting.h"
|
#include "../../menu/menu_setting.h"
|
||||||
@ -544,11 +545,10 @@ enum
|
|||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
#if TARGET_OS_IOS
|
#if TARGET_OS_IOS
|
||||||
if (jb_enable_ptrace_hack()) {
|
if (jb_enable_ptrace_hack())
|
||||||
NSLog(@"Ptrace hack complete, JIT support is enabled");
|
RARCH_LOG("Ptrace hack complete, JIT support is enabled.\n");
|
||||||
} else {
|
else
|
||||||
NSLog(@"Ptrace hack NOT available; Please use an app like Jitterbug.");
|
RARCH_WARN("Ptrace hack NOT available; Please use an app like Jitterbug.\n");
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
@autoreleasepool {
|
@autoreleasepool {
|
||||||
return UIApplicationMain(argc, argv, NSStringFromClass([RApplication class]), NSStringFromClass([RetroArch_iOS class]));
|
return UIApplicationMain(argc, argv, NSStringFromClass([RApplication class]), NSStringFromClass([RetroArch_iOS class]));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user