Fixed horizontal screen orientation + resizing
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
AppName="Alien Blaster"
|
AppName="Alien Blaster"
|
||||||
AppFullName=de.schwardtnet.alienblaster
|
AppFullName=de.schwardtnet.alienblaster
|
||||||
ScreenOrientation=v
|
ScreenOrientation=h
|
||||||
AppDataDownloadUrl="http://sites.google.com/site/xpelyax/Home/alienblaster110_data.zip?attredirects=0&d=1"
|
AppDataDownloadUrl="http://sites.google.com/site/xpelyax/Home/alienblaster110_data.zip?attredirects=0&d=1"
|
||||||
DownloadToSdcard=n
|
DownloadToSdcard=n
|
||||||
SdlVideoResize=y
|
SdlVideoResize=y
|
||||||
|
|||||||
@@ -126,6 +126,7 @@ mv -f project/res/values/strings.xml.1 project/res/values/strings.xml
|
|||||||
touch project/jni/sdl_main/*.c
|
touch project/jni/sdl_main/*.c
|
||||||
touch project/jni/sdl/src/video/android/*.c
|
touch project/jni/sdl/src/video/android/*.c
|
||||||
touch project/jni/sdl/src/video/SDL_video.c
|
touch project/jni/sdl/src/video/SDL_video.c
|
||||||
|
touch project/jni/sdl/src/video/SDL_renderer_gles.c
|
||||||
touch project/jni/sdl/src/audio/android/*.c
|
touch project/jni/sdl/src/audio/android/*.c
|
||||||
rm -f project/libs/armeabi/libapplication.so project/libs/armeabi/libsdl.so project/libs/armeabi/libsdl_main.so
|
rm -f project/libs/armeabi/libapplication.so project/libs/armeabi/libsdl.so project/libs/armeabi/libsdl_main.so
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<application android:label="@string/app_name">
|
<application android:label="@string/app_name">
|
||||||
<activity android:name=".MainActivity"
|
<activity android:name=".MainActivity"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:screenOrientation="portrait"
|
android:screenOrientation="landscape"
|
||||||
>
|
>
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN" />
|
<action android:name="android.intent.action.MAIN" />
|
||||||
|
|||||||
@@ -314,6 +314,10 @@ GLES_CreateRenderer(SDL_Window * window, Uint32 flags)
|
|||||||
data->GL_OES_draw_texture_supported = SDL_FALSE;
|
data->GL_OES_draw_texture_supported = SDL_FALSE;
|
||||||
data->useDrawTexture = SDL_FALSE;
|
data->useDrawTexture = SDL_FALSE;
|
||||||
}
|
}
|
||||||
|
#ifdef ANDROID
|
||||||
|
data->GL_OES_draw_texture_supported = SDL_TRUE;
|
||||||
|
data->useDrawTexture = SDL_TRUE;
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
data->glGetIntegerv(GL_MAX_TEXTURE_SIZE, &value);
|
data->glGetIntegerv(GL_MAX_TEXTURE_SIZE, &value);
|
||||||
@@ -890,7 +894,12 @@ GLES_RenderCopy(SDL_Renderer * renderer, SDL_Texture * texture,
|
|||||||
cropRect[3] = -srcrect->h;
|
cropRect[3] = -srcrect->h;
|
||||||
data->glTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_CROP_RECT_OES,
|
data->glTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_CROP_RECT_OES,
|
||||||
cropRect);
|
cropRect);
|
||||||
data->glDrawTexiOES(dstrect->x, window->h - dstrect->y - dstrect->h,
|
data->glDrawTexiOES(dstrect->x,
|
||||||
|
#if SDL_VIDEO_RENDER_RESIZE
|
||||||
|
window->display->current_mode.h - dstrect->y - dstrect->h,
|
||||||
|
#else
|
||||||
|
window->h - dstrect->y - dstrect->h,
|
||||||
|
#endif
|
||||||
0, dstrect->w, dstrect->h);
|
0, dstrect->w, dstrect->h);
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user