mirror of
https://github.com/celisej567/mcpe.git
synced 2026-01-05 18:10:09 +03:00
Fix Exiting Native Android
This commit is contained in:
committed by
iProgramInCpp
parent
8d3abda2fe
commit
8823acecbd
@@ -445,21 +445,30 @@ void android_main(struct android_app* state) {
|
||||
while ((ident = ALooper_pollAll(engine.animating ? 0 : -1, NULL, &events,
|
||||
(void**)&source)) >= 0) {
|
||||
|
||||
if (source != NULL) {
|
||||
if (source != NULL)
|
||||
{
|
||||
source->process(state, source);
|
||||
}
|
||||
|
||||
if (state->destroyRequested != 0)
|
||||
{
|
||||
goto exit;
|
||||
}
|
||||
}
|
||||
|
||||
if (engine.animating)
|
||||
{
|
||||
if (engine.ninecraftApp->wantToQuit())
|
||||
break;
|
||||
|
||||
engine.ninecraftApp->update();
|
||||
eglSwapBuffers(engine.display, engine.surface);
|
||||
|
||||
if (engine.ninecraftApp->wantToQuit())
|
||||
{
|
||||
ANativeActivity_finish(state->activity);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
exit:
|
||||
engine.ninecraftApp->saveOptions();
|
||||
delete engine.ninecraftApp;
|
||||
}
|
||||
@@ -978,7 +978,7 @@ void Minecraft::sizeUpdate(int newWidth, int newHeight)
|
||||
m_pScreen->setSize(int(Minecraft::width * Gui::InvGuiScale), int(Minecraft::height * Gui::InvGuiScale));
|
||||
|
||||
if (m_pInputHolder)
|
||||
m_pInputHolder->setScreenSize(newWidth * guiScaleMultiplier, newHeight * guiScaleMultiplier);
|
||||
m_pInputHolder->setScreenSize(Minecraft::width, Minecraft::height);
|
||||
}
|
||||
|
||||
float Minecraft::getBestScaleForThisScreenSize(int width, int height)
|
||||
|
||||
Reference in New Issue
Block a user