Reordered screen zoom settings, so the smallest display comes on top

This commit is contained in:
pelya
2011-11-24 17:22:34 +02:00
parent 15099fa668
commit c1e5111158
5 changed files with 58 additions and 39 deletions

View File

@@ -195,7 +195,7 @@ void UpdateScreenUnderFingerRect(int x, int y)
if( InsideRect(&SDL_ANDROID_ShowScreenUnderFingerRect, x, y) )
SDL_ANDROID_ShowScreenUnderFingerRect.x = x - SDL_ANDROID_ShowScreenUnderFingerRect.w*11/10 - 1;
}
if( SDL_ANDROID_ShowScreenUnderFinger == ZOOM_WHOLE_SCREEN )
if( SDL_ANDROID_ShowScreenUnderFinger == ZOOM_SCREEN_TRANSFORM )
{
SDL_ANDROID_ShowScreenUnderFingerRectSrc.w = screenX / 3;
SDL_ANDROID_ShowScreenUnderFingerRectSrc.h = screenY / 3;
@@ -648,7 +648,7 @@ JAVA_EXPORT_NAME(DemoGLSurfaceView_nativeMouse) ( JNIEnv* env, jobject thiz, j
if( SDL_ANDROID_ShowScreenUnderFinger == ZOOM_MAGNIFIER )
UpdateScreenUnderFingerRect(x, y);
}
if( SDL_ANDROID_ShowScreenUnderFinger == ZOOM_WHOLE_SCREEN ||
if( SDL_ANDROID_ShowScreenUnderFinger == ZOOM_SCREEN_TRANSFORM ||
SDL_ANDROID_ShowScreenUnderFinger == ZOOM_FULLSCREEN_MAGNIFIER )
UpdateScreenUnderFingerRect(x, y);
}

View File

@@ -28,7 +28,7 @@
#include "SDL_joystick.h"
#include "SDL_events.h"
enum ScreenZoom { ZOOM_NONE = 0, ZOOM_MAGNIFIER = 1, ZOOM_WHOLE_SCREEN = 2, ZOOM_FULLSCREEN_MAGNIFIER = 3 };
enum ScreenZoom { ZOOM_NONE = 0, ZOOM_MAGNIFIER = 1, ZOOM_SCREEN_TRANSFORM = 2, ZOOM_FULLSCREEN_MAGNIFIER = 3 };
extern int SDL_ANDROID_sWindowWidth;
extern int SDL_ANDROID_sWindowHeight;