|
@@ -32,7 +32,9 @@
|
|
|
|
|
|
#include "core/project_settings.h"
|
|
#include "core/project_settings.h"
|
|
#include "drivers/coreaudio/audio_driver_coreaudio.h"
|
|
#include "drivers/coreaudio/audio_driver_coreaudio.h"
|
|
|
|
+#if defined(OPENGL_ENABLED)
|
|
#import "gl_view.h"
|
|
#import "gl_view.h"
|
|
|
|
+#endif
|
|
#include "main/main.h"
|
|
#include "main/main.h"
|
|
#include "os_iphone.h"
|
|
#include "os_iphone.h"
|
|
|
|
|
|
@@ -412,10 +414,12 @@ static void on_focus_in(ViewController *view_controller, bool *is_focus_out) {
|
|
OS::VideoMode _get_video_mode() {
|
|
OS::VideoMode _get_video_mode() {
|
|
int backingWidth;
|
|
int backingWidth;
|
|
int backingHeight;
|
|
int backingHeight;
|
|
|
|
+#if defined(OPENGL_ENABLED)
|
|
glGetRenderbufferParameterivOES(GL_RENDERBUFFER_OES,
|
|
glGetRenderbufferParameterivOES(GL_RENDERBUFFER_OES,
|
|
GL_RENDERBUFFER_WIDTH_OES, &backingWidth);
|
|
GL_RENDERBUFFER_WIDTH_OES, &backingWidth);
|
|
glGetRenderbufferParameterivOES(GL_RENDERBUFFER_OES,
|
|
glGetRenderbufferParameterivOES(GL_RENDERBUFFER_OES,
|
|
GL_RENDERBUFFER_HEIGHT_OES, &backingHeight);
|
|
GL_RENDERBUFFER_HEIGHT_OES, &backingHeight);
|
|
|
|
+#endif
|
|
|
|
|
|
OS::VideoMode vm;
|
|
OS::VideoMode vm;
|
|
vm.fullscreen = true;
|
|
vm.fullscreen = true;
|
|
@@ -426,7 +430,7 @@ OS::VideoMode _get_video_mode() {
|
|
};
|
|
};
|
|
|
|
|
|
static int frame_count = 0;
|
|
static int frame_count = 0;
|
|
-- (void)drawView:(GLView *)view;
|
|
|
|
|
|
+- (void)drawView:(UIView *)view;
|
|
{
|
|
{
|
|
|
|
|
|
switch (frame_count) {
|
|
switch (frame_count) {
|
|
@@ -634,6 +638,7 @@ static int frame_count = 0;
|
|
return FALSE;
|
|
return FALSE;
|
|
};
|
|
};
|
|
|
|
|
|
|
|
+#if defined(OPENGL_ENABLED)
|
|
// WARNING: We must *always* create the GLView after we have constructed the
|
|
// WARNING: We must *always* create the GLView after we have constructed the
|
|
// OS with iphone_main. This allows the GLView to access project settings so
|
|
// OS with iphone_main. This allows the GLView to access project settings so
|
|
// it can properly initialize the OpenGL context
|
|
// it can properly initialize the OpenGL context
|
|
@@ -642,7 +647,7 @@ static int frame_count = 0;
|
|
|
|
|
|
view_controller = [[ViewController alloc] init];
|
|
view_controller = [[ViewController alloc] init];
|
|
view_controller.view = glView;
|
|
view_controller.view = glView;
|
|
- window.rootViewController = view_controller;
|
|
|
|
|
|
+
|
|
|
|
|
|
_set_keep_screen_on(bool(GLOBAL_DEF("display/window/energy_saving/keep_screen_on", true)) ? YES : NO);
|
|
_set_keep_screen_on(bool(GLOBAL_DEF("display/window/energy_saving/keep_screen_on", true)) ? YES : NO);
|
|
glView.useCADisplayLink =
|
|
glView.useCADisplayLink =
|
|
@@ -650,6 +655,13 @@ static int frame_count = 0;
|
|
printf("cadisaplylink: %d", glView.useCADisplayLink);
|
|
printf("cadisaplylink: %d", glView.useCADisplayLink);
|
|
glView.animationInterval = 1.0 / kRenderingFrequency;
|
|
glView.animationInterval = 1.0 / kRenderingFrequency;
|
|
[glView startAnimation];
|
|
[glView startAnimation];
|
|
|
|
+#endif
|
|
|
|
+
|
|
|
|
+#if defined(VULKAN_ENABLED)
|
|
|
|
+ view_controller = [[ViewController alloc] init];
|
|
|
|
+#endif
|
|
|
|
+
|
|
|
|
+ window.rootViewController = view_controller;
|
|
|
|
|
|
// Show the window
|
|
// Show the window
|
|
[window makeKeyAndVisible];
|
|
[window makeKeyAndVisible];
|