Skip to content

Instantly share code, notes, and snippets.

@peat-psuwit
Created December 20, 2016 09:04
Show Gist options
  • Save peat-psuwit/f7cb1c9c78acf7dddaffdd24fe960d80 to your computer and use it in GitHub Desktop.
Save peat-psuwit/f7cb1c9c78acf7dddaffdd24fe960d80 to your computer and use it in GitHub Desktop.
Patch to prevent Mir client on android to change pixel format to something Mir server didn't expect.
--- mir-0.24.1+15.04.20160928.orig/src/platforms/android/client/egl_native_surface_interpreter.cpp
+++ mir-0.24.1+15.04.20160928/src/platforms/android/client/egl_native_surface_interpreter.cpp
@@ -59,7 +59,9 @@
void mcla::EGLNativeSurfaceInterpreter::dispatch_driver_request_format(int format)
{
- driver_pixel_format = format;
+ if (driver_pixel_format == -1 || driver_pixel_format == 0 || format == 0)
+ driver_pixel_format = format;
+ //TODO: pass format changes to server
}
int mcla::EGLNativeSurfaceInterpreter::driver_requests_info(int key) const
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment