/
redgpu
/
ezEngine
Обзор
Документация
Войти
/
redgpu
/
ezEngine
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
dev
Code/Engine/Foundation/Platform/Android/Screen_Android.cpp
26 строк
851 B
Jan Krassnigg
Refactor of platform specific includes (#1414)
23 окт 2024, 10:09
Не верифицирован
23 окт 2024, 10:09
74f6d97
Код
Авторство
О чём код?
#include <Foundation/FoundationPCH.h> #include <Foundation/Basics/Platform/PlatformFeatures.h> #include <Foundation/System/Screen.h> #if EZ_ENABLED(EZ_PLATFORM_ANDROID) # include <Foundation/Platform/Android/Utils/AndroidUtils.h> # include <android_native_app_glue.h> ezResult ezScreen::EnumerateScreens(ezDynamicArray<ezScreenInfo>& out_Screens) { if (ANativeWindow* pWindow = ezAndroidUtils::GetAndroidApp()->window) { ezScreenInfo& currentScreen = out_Screens.ExpandAndGetRef(); currentScreen.m_sDisplayName = "Current Display"; currentScreen.m_iOffsetX = 0; currentScreen.m_iOffsetY = 0; currentScreen.m_iResolutionX = ANativeWindow_getWidth(pWindow); currentScreen.m_iResolutionY = ANativeWindow_getHeight(pWindow); currentScreen.m_bIsPrimary = true; return EZ_SUCCESS; } return EZ_FAILURE; } #endif