mirror of
https://github.com/ogoguel/activegs-ios.git
synced 2025-02-28 06:29:04 +00:00
Improving orientation
This commit is contained in:
parent
f5308f0792
commit
00a7bf4a5f
@ -532,7 +532,11 @@ int x_lock_zoom = 0;
|
|||||||
|
|
||||||
// primary parameters
|
// primary parameters
|
||||||
|
|
||||||
requiredOrientation = ([pManager getAngle]/90)+1;
|
if ( abs([pManager getAngle])==90.0f )
|
||||||
|
requiredOrientation = 0;
|
||||||
|
else
|
||||||
|
requiredOrientation = 1;
|
||||||
|
// requiredOrientation = ([pManager getAngle]/90)+1;
|
||||||
kbddelta = [self.kbdc getEmulatorDelta];
|
kbddelta = [self.kbdc getEmulatorDelta];
|
||||||
|
|
||||||
NSString* systemVer = [[UIDevice currentDevice] systemVersion];
|
NSString* systemVer = [[UIDevice currentDevice] systemVersion];
|
||||||
|
@ -21,8 +21,8 @@
|
|||||||
|
|
||||||
|
|
||||||
#undef debug_printf
|
#undef debug_printf
|
||||||
#define debug_printf(...)
|
//#define debug_printf(...)
|
||||||
//#define debug_printf printf
|
#define debug_printf printf
|
||||||
//#define SHOW_COLOR
|
//#define SHOW_COLOR
|
||||||
|
|
||||||
@implementation zoomEmulatorView
|
@implementation zoomEmulatorView
|
||||||
@ -175,6 +175,13 @@ float refScaleLandscape;
|
|||||||
int w = (int)viewSize.width;
|
int w = (int)viewSize.width;
|
||||||
int h = (int)viewSize.height;
|
int h = (int)viewSize.height;
|
||||||
|
|
||||||
|
// Force Portrait
|
||||||
|
if (w > h)
|
||||||
|
{
|
||||||
|
w = (int)viewSize.height;
|
||||||
|
h = (int)viewSize.width;
|
||||||
|
}
|
||||||
|
|
||||||
debug_printf("apprect %d x %d\n",w,h);
|
debug_printf("apprect %d x %d\n",w,h);
|
||||||
|
|
||||||
#define ZOOM_CLAMP 0.25 // calcul un zoom par multiple *.25
|
#define ZOOM_CLAMP 0.25 // calcul un zoom par multiple *.25
|
||||||
|
Loading…
x
Reference in New Issue
Block a user