Improving orientation

This commit is contained in:
Olivier Goguel 2016-04-03 16:56:50 +02:00
parent f5308f0792
commit 00a7bf4a5f
2 changed files with 14 additions and 3 deletions

View File

@ -532,7 +532,11 @@ int x_lock_zoom = 0;
// 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];
NSString* systemVer = [[UIDevice currentDevice] systemVersion];

View File

@ -21,8 +21,8 @@
#undef debug_printf
#define debug_printf(...)
//#define debug_printf printf
//#define debug_printf(...)
#define debug_printf printf
//#define SHOW_COLOR
@implementation zoomEmulatorView
@ -175,6 +175,13 @@ float refScaleLandscape;
int w = (int)viewSize.width;
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);
#define ZOOM_CLAMP 0.25 // calcul un zoom par multiple *.25