for android

This commit is contained in:
Attila Uygun 2023-05-25 15:33:05 +02:00
parent aca0213b0a
commit b1c2e3f0d4
1 changed files with 15 additions and 15 deletions

View File

@ -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: