iOS compile fixes.

This commit is contained in:
Aren Villanueva 2015-11-16 11:07:21 +11:00
parent 00d79a6d6c
commit 402c24ec8b
9 changed files with 25 additions and 7 deletions

View file

@ -111,7 +111,7 @@ class RasterizerGLES2 : public Rasterizer {
Image _get_gl_image_and_format(const Image& p_image, Image::Format p_format, uint32_t p_flags,GLenum& r_gl_format,GLenum& r_gl_internal_format,int &r_gl_components,bool &r_has_alpha_cache,bool &r_compressed);
class RenderTarget;
struct RenderTarget;
struct Texture {
@ -305,7 +305,7 @@ class RasterizerGLES2 : public Rasterizer {
virtual ~GeometryOwner() {}
};
class Mesh;
struct Mesh;
struct Surface : public Geometry {

View file

@ -34,7 +34,7 @@ class ShaderCompilerGLES2 {
class Uniform;
public:
class Flags;
struct Flags;
private:
ShaderLanguage::ProgramNode *program_node;

View file

@ -56,6 +56,8 @@
#import "Appirater.h"
#endif
Error _shell_open(String);
Error _shell_open(String p_uri) {
NSString* url = [[NSString alloc] initWithUTF8String:p_uri.utf8().get_data()];

View file

@ -30,8 +30,8 @@
#include "game_center.h"
extern "C" {
#import <GameKit/GameKit.h>
extern "C" {
#import "app_delegate.h"
};

View file

@ -54,6 +54,14 @@ static bool video_playing = false;
static float video_previous_volume = 0.0f;
static CMTime video_current_time;
void _show_keyboard(String);
void _hide_keyboard();
bool _play_video(String, float, String, String);
bool _is_video_playing();
void _focus_out_video();
void _unpause_video();
void _stop_video();
void _show_keyboard(String p_existing) {
keyboard_text = p_existing;
printf("instance on show is %p\n", _instance);
@ -618,7 +626,7 @@ static void clear_touches() {
- (void)audioRouteChangeListenerCallback:(NSNotification*)notification
{
printf("*********** route changed!%i\n");
printf("*********** route changed!\n");
NSDictionary *interuptionDict = notification.userInfo;
NSInteger routeChangeReason = [[interuptionDict valueForKey:AVAudioSessionRouteChangeReasonKey] integerValue];

View file

@ -40,6 +40,8 @@ int add_path(int p_argc, char** p_args);
int add_cmdline(int p_argc, char** p_args);
};
int iphone_main(int, int, int, char**);
int iphone_main(int width, int height, int argc, char** argv) {
int len = strlen(argv[0]);

View file

@ -30,10 +30,8 @@
#include "icloud.h"
extern "C" {
#import <Foundation/Foundation.h>
#import "app_delegate.h"
};
ICloud* ICloud::instance = NULL;

View file

@ -31,6 +31,11 @@
#include <unistd.h>
#include <fcntl.h>
void cgsem_init(cgsem_t*);
void cgsem_post(cgsem_t*);
void cgsem_wait(cgsem_t*);
void cgsem_destroy(cgsem_t*);
void cgsem_init(cgsem_t *cgsem)
{
int flags, fd, i;

View file

@ -32,6 +32,9 @@
extern "C" {
int add_path(int, char**);
int add_cmdline(int, char**);
int add_path(int p_argc, char** p_args) {
NSString* str = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"godot_path"];