![]() |
|
Getting device resolution on Android |
Tikkunekku
Member #14,982
March 2013
|
I'm implementing an Android version of my game Blastonaut and i've run into an issue: DeviceScreenWidth/Height are both zeros on Android. Heres the code: ALLEGRO_MONITOR_INFO mInfo; al_get_monitor_info(0 , &mInfo); int DeviceScreenWidth = mInfo.x2 - mInfo.x1; int DeviceScreenHeight = mInfo.y2 - mInfo.y1; // Portrait mode gameDisplay = al_create_display(DeviceScreenHeight, DeviceScreenWidth); P.S. I'm testing on a Galaxy S4. |
|