Nehemek
Member
Hello, I'm having some issues on some Android devices and on iOs where my game is not scaling up correctly. I instead get like 90% of the width of the screen. This is my scaling up code:
Thank you in advance.
Code:
var resolution_width, resolution_height, viewh, vieww, aspect;
switch(os_type)
{
case os_windows: case os_macosx: case os_linux:
var resolution_width = display_get_width();
resolution_height = display_get_height();
if os_browser == browser_not_a_browser {resolution_width*=.9; resolution_height*= .9;}
else
{
if global.resolution_mode
{
resolution_width = browser_width;
resolution_height = browser_height;
}
}
break;
case os_android: case os_ios: case os_winphone:
global.device_mobile = true;
if os_type == os_android global.haptics_enabled = Haptics_HasVibrator();
var resolution_width = display_get_width(),
resolution_height = display_get_height();
break;
}
aspect = resolution_width/resolution_height;
vieww = 620*aspect;
viewh = 620;
view_set_wport(global.camera_index,vieww);
view_set_hport(global.camera_index,viewh);
camera_set_view_size(global.camera_index,vieww,viewh);
global.resolution_width = vieww;
global.resolution_height = viewh;
global.save_resolution_width = browser_width;
global.save_resolution_height = browser_height;
surface_resize(application_surface,resolution_width,resolution_height);
display_set_gui_size(vieww,viewh);