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";
|
||||
if (app->window != NULL) {
|
||||
platform->SetFrameRate(60);
|
||||
bool res = platform->InitializeRenderer();
|
||||
CHECK(res) << "Failed to initialize "
|
||||
<< platform->renderer_->GetDebugName() << " renderer.";
|
||||
// bool res = platform->InitializeRenderer();
|
||||
// CHECK(res) << "Failed to initialize "
|
||||
// << platform->renderer_->GetDebugName() << " renderer.";
|
||||
}
|
||||
break;
|
||||
|
||||
case APP_CMD_TERM_WINDOW:
|
||||
DLOG << "APP_CMD_TERM_WINDOW";
|
||||
platform->renderer_->Shutdown();
|
||||
// platform->renderer_->Shutdown();
|
||||
break;
|
||||
|
||||
case APP_CMD_CONFIG_CHANGED:
|
||||
DLOG << "APP_CMD_CONFIG_CHANGED";
|
||||
if (platform->app_->window != NULL) {
|
||||
int width = platform->renderer_->screen_width();
|
||||
int height = platform->renderer_->screen_height();
|
||||
if (width != ANativeWindow_getWidth(app->window) ||
|
||||
height != ANativeWindow_getHeight(app->window)) {
|
||||
platform->renderer_->Shutdown();
|
||||
bool res = platform->InitializeRenderer();
|
||||
CHECK(res) << "Failed to initialize "
|
||||
<< platform->renderer_->GetDebugName() << " renderer.";
|
||||
}
|
||||
}
|
||||
// if (platform->app_->window != NULL) {
|
||||
// int width = platform->renderer_->screen_width();
|
||||
// int height = platform->renderer_->screen_height();
|
||||
// if (width != ANativeWindow_getWidth(app->window) ||
|
||||
// height != ANativeWindow_getHeight(app->window)) {
|
||||
// platform->renderer_->Shutdown();
|
||||
// bool res = platform->InitializeRenderer();
|
||||
// CHECK(res) << "Failed to initialize "
|
||||
// << platform->renderer_->GetDebugName() << " renderer.";
|
||||
// }
|
||||
// }
|
||||
break;
|
||||
|
||||
case APP_CMD_STOP:
|
||||
|
|
Loading…
Reference in New Issue