Android: remove deprecated PixelFormat in surfaceChanged()
authorSylvain Becker <sylvain.becker@gmail.com>
Thu, 10 Jan 2019 16:04:52 +0100
changeset 1252034126acf146f
parent 12519 4476dd3fec4a
child 12521 2a567875fe8e
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
android-project/app/src/main/java/org/libsdl/app/SDLActivity.java
     1.1 --- a/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java	Thu Jan 10 15:48:43 2019 +0100
     1.2 +++ b/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java	Thu Jan 10 16:04:52 2019 +0100
     1.3 @@ -1598,23 +1598,6 @@
     1.4  
     1.5          int sdlFormat = 0x15151002; // SDL_PIXELFORMAT_RGB565 by default
     1.6          switch (format) {
     1.7 -        case PixelFormat.A_8:
     1.8 -            Log.v("SDL", "pixel format A_8");
     1.9 -            break;
    1.10 -        case PixelFormat.LA_88:
    1.11 -            Log.v("SDL", "pixel format LA_88");
    1.12 -            break;
    1.13 -        case PixelFormat.L_8:
    1.14 -            Log.v("SDL", "pixel format L_8");
    1.15 -            break;
    1.16 -        case PixelFormat.RGBA_4444:
    1.17 -            Log.v("SDL", "pixel format RGBA_4444");
    1.18 -            sdlFormat = 0x15421002; // SDL_PIXELFORMAT_RGBA4444
    1.19 -            break;
    1.20 -        case PixelFormat.RGBA_5551:
    1.21 -            Log.v("SDL", "pixel format RGBA_5551");
    1.22 -            sdlFormat = 0x15441002; // SDL_PIXELFORMAT_RGBA5551
    1.23 -            break;
    1.24          case PixelFormat.RGBA_8888:
    1.25              Log.v("SDL", "pixel format RGBA_8888");
    1.26              sdlFormat = 0x16462004; // SDL_PIXELFORMAT_RGBA8888
    1.27 @@ -1623,10 +1606,6 @@
    1.28              Log.v("SDL", "pixel format RGBX_8888");
    1.29              sdlFormat = 0x16261804; // SDL_PIXELFORMAT_RGBX8888
    1.30              break;
    1.31 -        case PixelFormat.RGB_332:
    1.32 -            Log.v("SDL", "pixel format RGB_332");
    1.33 -            sdlFormat = 0x14110801; // SDL_PIXELFORMAT_RGB332
    1.34 -            break;
    1.35          case PixelFormat.RGB_565:
    1.36              Log.v("SDL", "pixel format RGB_565");
    1.37              sdlFormat = 0x15151002; // SDL_PIXELFORMAT_RGB565