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
mist64
left a comment
There was a problem hiding this comment.
Sorry, mostly nitpicking. If you want, you can ignore pretty much everything, and I can massage the code later.
Thoughts?
| #include <stdio.h> | ||
| #include <inttypes.h> | ||
|
|
||
| #if __APPLE__ |
There was a problem hiding this comment.
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.
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.
You also do this in main(). Remove there? Remove here?
There was a problem hiding this comment.
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.
dismissViewControllerAnimated:completion:?
There was a problem hiding this comment.
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.
| @@ -0,0 +1,51 @@ | |||
| // | |||
There was a problem hiding this comment.
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.
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.
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.
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); | ||
| } |
| *data++ = 0; | ||
|
|
||
| if (!(dirp = opendir("."))) { | ||
| #if __APPLE__ && (TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE) |
There was a problem hiding this comment.
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.
| 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.
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.
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.
@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