Skip to content

Commit

Permalink
[android] Make sure we get Event.APPLICATION_BACKGROUND immediately
Browse files Browse the repository at this point in the history
[plugin/share] Support more mime types for iOS
[android] Remove Old apache HTTP (Fix #331)
  • Loading branch information
hgy29 committed Nov 9, 2021
1 parent ebfa0c7 commit f81409f
Show file tree
Hide file tree
Showing 7 changed files with 180 additions and 241 deletions.
2 changes: 1 addition & 1 deletion 2dsg/gfxbackends/gl2/gl2ShaderEngine.cpp
Expand Up @@ -595,7 +595,7 @@ ShaderTexture::Packing ogl2ShaderEngine::getPreferredPackingForTextureFormat(Sha
{
switch (format) {
case ShaderTexture::FMT_DEPTH:
return ShaderTexture::PK_UINT;
return (ogl2ShaderEngine::isGLES&&(ogl2ShaderEngine::version>=3))?ShaderTexture::PK_FLOAT:ShaderTexture::PK_UINT;
default:
return ShaderTexture::PK_UBYTE;
}
Expand Down
2 changes: 1 addition & 1 deletion 2dsg/gfxbackends/gl2/gl2ShaderTexture.cpp
Expand Up @@ -68,7 +68,7 @@ ogl2ShaderTexture::ogl2ShaderTexture(ShaderTexture::Format format,ShaderTexture:
const void *idata=data;
if (ogl2ShaderEngine::isGLES&&(ogl2ShaderEngine::version>=3)) {
if (glformat==GL_DEPTH_COMPONENT) {
iformat=GL_DEPTH_COMPONENT24;
iformat=GL_DEPTH_COMPONENT32F;
idata=NULL; //Don't supply data for depth component
}
}
Expand Down
Expand Up @@ -538,7 +538,8 @@ public void onStop()

if (isSurfaceCreated_ == true) {
synchronized (eventQueue_) {
eventQueue_.add(STOP);
nativeStop();
nativeTick();
}
}
}
Expand All @@ -556,12 +557,8 @@ public void onPause()

if (isSurfaceCreated_ == true) {
synchronized (eventQueue_) {
eventQueue_.add(PAUSE);
try {
//on some devices, onDrawFrame will not called when screen locked,this thread will not wake up
eventQueue_.wait(100);
} catch (InterruptedException e) {
}
nativePause();
nativeTick();
}
}

Expand Down Expand Up @@ -602,12 +599,8 @@ public void onResume()

if (isSurfaceCreated_ == true) {
synchronized (eventQueue_) {
eventQueue_.add(RESUME);
try {
//on some devices, onDrawFrame will not called when screen locked,this thread will not wake up
eventQueue_.wait(100);
} catch (InterruptedException e) {
}
nativeResume();
nativeTick();
}
}
}
Expand Down Expand Up @@ -1490,6 +1483,7 @@ else if (fn.startsWith("in main chunk"))
static private native void nativeSurfaceChanged(int w, int h, int rotation,Surface surface);
static private native void nativeSurfaceDestroyed();
static private native void nativeDrawFrame();
static private native void nativeTick();
static private native void nativeMouseWheel(int x,int y,int button,float amount);
static private native void nativeTouchesBegin(int size, int[] id, int[] x, int[] y, float[] pressure, int actionIndex);
static private native void nativeTouchesMove(int size, int[] id, int[] x, int[] y, float[] pressure);
Expand Down

0 comments on commit f81409f

Please sign in to comment.