(Cocoa) small style nits; don't use NSLog

This commit is contained in:
LibretroAdmin 2022-10-26 17:36:58 +02:00
parent 18639cca6e
commit 46c2a9b950
2 changed files with 15 additions and 17 deletions

View File

@ -174,11 +174,10 @@ void *glkitview_init(void);
#ifdef HAVE_IOS_CUSTOMKEYBOARD
int cmdData = self.keyboardController.view.isHidden ? 0 : 1;
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);
} else {
else
command_event(CMD_EVENT_OVERLAY_DEINIT, NULL);
}
#endif
}
@ -353,24 +352,23 @@ void *glkitview_init(void);
#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;
if (apple == NULL) {
if (!apple)
return;
}
NSUInteger buttonIndex = isLeftClick ? 0 : 1;
if (isPressed) {
if (isPressed)
apple->mouse_buttons |= (1 << buttonIndex);
} else {
else
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;
if (apple == NULL) {
if (!apple)
return;
}
apple->mouse_rel_x = (int16_t)x;
apple->mouse_rel_y = (int16_t)y;
}

View File

@ -33,6 +33,7 @@
#include "../../input/drivers/cocoa_input.h"
#include "../../input/drivers_keyboard/keyboard_event_apple.h"
#include "../../retroarch.h"
#include "../../verbosity.h"
#ifdef HAVE_MENU
#include "../../menu/menu_setting.h"
@ -544,11 +545,10 @@ enum
int main(int argc, char *argv[])
{
#if TARGET_OS_IOS
if (jb_enable_ptrace_hack()) {
NSLog(@"Ptrace hack complete, JIT support is enabled");
} else {
NSLog(@"Ptrace hack NOT available; Please use an app like Jitterbug.");
}
if (jb_enable_ptrace_hack())
RARCH_LOG("Ptrace hack complete, JIT support is enabled.\n");
else
RARCH_WARN("Ptrace hack NOT available; Please use an app like Jitterbug.\n");
#endif
@autoreleasepool {
return UIApplicationMain(argc, argv, NSStringFromClass([RApplication class]), NSStringFromClass([RetroArch_iOS class]));