mirror of https://github.com/auygun/kaliber.git
for android
This commit is contained in:
parent
aca0213b0a
commit
b1c2e3f0d4
|
@ -294,30 +294,30 @@ void Platform::HandleCmd(android_app* app, int32_t cmd) {
|
||||||
DLOG << "APP_CMD_INIT_WINDOW";
|
DLOG << "APP_CMD_INIT_WINDOW";
|
||||||
if (app->window != NULL) {
|
if (app->window != NULL) {
|
||||||
platform->SetFrameRate(60);
|
platform->SetFrameRate(60);
|
||||||
bool res = platform->InitializeRenderer();
|
// bool res = platform->InitializeRenderer();
|
||||||
CHECK(res) << "Failed to initialize "
|
// CHECK(res) << "Failed to initialize "
|
||||||
<< platform->renderer_->GetDebugName() << " renderer.";
|
// << platform->renderer_->GetDebugName() << " renderer.";
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case APP_CMD_TERM_WINDOW:
|
case APP_CMD_TERM_WINDOW:
|
||||||
DLOG << "APP_CMD_TERM_WINDOW";
|
DLOG << "APP_CMD_TERM_WINDOW";
|
||||||
platform->renderer_->Shutdown();
|
// platform->renderer_->Shutdown();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case APP_CMD_CONFIG_CHANGED:
|
case APP_CMD_CONFIG_CHANGED:
|
||||||
DLOG << "APP_CMD_CONFIG_CHANGED";
|
DLOG << "APP_CMD_CONFIG_CHANGED";
|
||||||
if (platform->app_->window != NULL) {
|
// if (platform->app_->window != NULL) {
|
||||||
int width = platform->renderer_->screen_width();
|
// int width = platform->renderer_->screen_width();
|
||||||
int height = platform->renderer_->screen_height();
|
// int height = platform->renderer_->screen_height();
|
||||||
if (width != ANativeWindow_getWidth(app->window) ||
|
// if (width != ANativeWindow_getWidth(app->window) ||
|
||||||
height != ANativeWindow_getHeight(app->window)) {
|
// height != ANativeWindow_getHeight(app->window)) {
|
||||||
platform->renderer_->Shutdown();
|
// platform->renderer_->Shutdown();
|
||||||
bool res = platform->InitializeRenderer();
|
// bool res = platform->InitializeRenderer();
|
||||||
CHECK(res) << "Failed to initialize "
|
// CHECK(res) << "Failed to initialize "
|
||||||
<< platform->renderer_->GetDebugName() << " renderer.";
|
// << platform->renderer_->GetDebugName() << " renderer.";
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case APP_CMD_STOP:
|
case APP_CMD_STOP:
|
||||||
|
|
Loading…
Reference in New Issue