mirror of https://github.com/encounter/SDL.git
Android: remove deprecated PixelFormat in surfaceChanged()
Can be check by adding in build.grable: gradle.projectsEvaluated { tasks.withType(JavaCompile) { options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation" } } SDLActivity.java:1691: warning: [deprecation] A_8 in PixelFormat has been deprecated case PixelFormat.A_8: SDLActivity.java:1694: warning: [deprecation] LA_88 in PixelFormat has been deprecated SDLActivity.java:1697: warning: [deprecation] L_8 in PixelFormat has been deprecated SDLActivity.java:1700: warning: [deprecation] RGBA_4444 in PixelFormat has been deprecated SDLActivity.java:1704: warning: [deprecation] RGBA_5551 in PixelFormat has been deprecated SDLActivity.java:1716: warning: [deprecation] RGB_332 in PixelFormat has been deprecated
This commit is contained in:
parent
5c11e5ef92
commit
0e0e0272b8
|
@ -1598,23 +1598,6 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
|
|||
|
||||
int sdlFormat = 0x15151002; // SDL_PIXELFORMAT_RGB565 by default
|
||||
switch (format) {
|
||||
case PixelFormat.A_8:
|
||||
Log.v("SDL", "pixel format A_8");
|
||||
break;
|
||||
case PixelFormat.LA_88:
|
||||
Log.v("SDL", "pixel format LA_88");
|
||||
break;
|
||||
case PixelFormat.L_8:
|
||||
Log.v("SDL", "pixel format L_8");
|
||||
break;
|
||||
case PixelFormat.RGBA_4444:
|
||||
Log.v("SDL", "pixel format RGBA_4444");
|
||||
sdlFormat = 0x15421002; // SDL_PIXELFORMAT_RGBA4444
|
||||
break;
|
||||
case PixelFormat.RGBA_5551:
|
||||
Log.v("SDL", "pixel format RGBA_5551");
|
||||
sdlFormat = 0x15441002; // SDL_PIXELFORMAT_RGBA5551
|
||||
break;
|
||||
case PixelFormat.RGBA_8888:
|
||||
Log.v("SDL", "pixel format RGBA_8888");
|
||||
sdlFormat = 0x16462004; // SDL_PIXELFORMAT_RGBA8888
|
||||
|
@ -1623,10 +1606,6 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
|
|||
Log.v("SDL", "pixel format RGBX_8888");
|
||||
sdlFormat = 0x16261804; // SDL_PIXELFORMAT_RGBX8888
|
||||
break;
|
||||
case PixelFormat.RGB_332:
|
||||
Log.v("SDL", "pixel format RGB_332");
|
||||
sdlFormat = 0x14110801; // SDL_PIXELFORMAT_RGB332
|
||||
break;
|
||||
case PixelFormat.RGB_565:
|
||||
Log.v("SDL", "pixel format RGB_565");
|
||||
sdlFormat = 0x15151002; // SDL_PIXELFORMAT_RGB565
|
||||
|
|
Loading…
Reference in New Issue