-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IPad Version #233
base: master
Are you sure you want to change the base?
IPad Version #233
Conversation
…oment because RAM[] seems to be empty. - settings view controller displayed if SDL_Menu received. - bug in RAM[] nothing showing - not sure yet.
write/load/list in documents folder
Add button to re-enable keyboard if dismissed by user.
…ses and allow code merge.
Add launch images and icon
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, mostly nitpicking. If you want, you can ignore pretty much everything, and I can massage the code later.
Thoughts?
debugger.c
Outdated
@@ -12,7 +12,22 @@ | |||
#include <stdlib.h> | |||
#include <stdio.h> | |||
#include <inttypes.h> | |||
|
|||
#if __APPLE__ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is repeated a lot. Can we have something like this:
#if __APPLE__ && (TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE)
#include "ios.h"
#endif
and do the magic there?
Even if different .c files want different iOS headers to be included, we could just include all of them in "ios.h"; no harm in that.
Also, why special case Mac? What's "TargetConditionals.h"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The mac uses the standard code, TargetConditionals.h allows you to target specific apple platforms.
|
||
-(IBAction)toggleKeyboard:(id)sender { | ||
|
||
SDL_StartTextInput(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You also do this in main(). Remove there? Remove here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You have to have a way of restarting input. If you completely dismiss the keyboard then SDL stops accepting input.
|
||
-(IBAction)closeWindow:(id)sender | ||
{ | ||
[self.view removeFromSuperview]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dismissViewControllerAnimated:completion:
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to look at how SDL manages windows and views. This is the quickest way at the moment. I'll maybe add this as a todo.
xcode/X16/iOS/ios_functions.c
Outdated
@@ -0,0 +1,51 @@ | |||
// |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yay, msgSend magic! :)
But I don't see why this can't be ios_functions.m and use ObjC? The interface to the main code can still be the same, using a C interface.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At the moment the observer of notifications sent between .c and SDL needs to be created through msgsend. I removed the notification msgsend though.
@@ -0,0 +1,99 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
XIBs are impossible to review. :( I'm trusting you this is complex enough that you don't want to build any of this in code... :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hoping that these are going to be temporary.
Add iPAD details
Remove submodule.
Add reset function More code tidy ups.
Rename Settings viewcontroller to Input View Controller - more appropriate name.
@mattuna15 Tell me when it's a good time to look over the change again. |
@mist64 will do. I'm working with Jimmy Dansbo to get a socket interface up and running. So I will try and include that. Thanks for the note. |
P.S.: I'd rather merge the current state than wait for all features. :) |
Great no problems. |
@mist64 good to go. 👍 |
if (log_keyboard) { | ||
printf("DOWN 0x%02X\n", scancode); | ||
fflush(stdout); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indenting is incorrect.
@@ -51,7 +57,17 @@ create_directory_listing(uint8_t *data) | |||
*data++ = 'C'; | |||
*data++ = 0; | |||
|
|||
if (!(dirp = opendir("."))) { | |||
#if __APPLE__ && (TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You do this concatening a few times in this file.
Maybe extract it to some static helper function?
You can move the ifdef to it too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 thanks I'll take a look.
@@ -933,6 +932,14 @@ video_update() | |||
mouse_x = event.motion.x; | |||
mouse_y = event.motion.y; | |||
} | |||
#if __APPLE__ && (TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE) | |||
if (event.type == SDL_DROPFILE) { // In case if dropped file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this drop event also be enabled on other systems?
I mean, it would also be nice to have this on my PC.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes - sure I'll remove the conditional.
@@ -0,0 +1,14 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mist64
Having support for a build system such as cmake or meson would obviate the need for inclusion of these project files.
Add Frameworks.zip dependency for iPad app (expand zip file in Xcode directory).
Add Xcode project and objective-c code
Supports dragging and dropping BIN and PRG files
Provides onscreen keys, onscreen joystick and support for external gamecontrollers.
Supports Sound
Drag and drop of PRG/BIN files from itunes.
TODO: Drag & drop of BAS files