Event Horizons
Member
Hi there,
I am trying to do screen adjustment by device, following Pixelated pope tutorial.
Everything works great, screen is adjusting, but the thing is that the screen is adjusting at the bottom, top of the view is at the top of the screen, but what I need to have is, that bottom of the view is at the bottom of the device screen (hope it makes sense )
Here is code I have at the moment
Thank you
EH
I am trying to do screen adjustment by device, following Pixelated pope tutorial.
Everything works great, screen is adjusting, but the thing is that the screen is adjusting at the bottom, top of the view is at the top of the screen, but what I need to have is, that bottom of the view is at the bottom of the device screen (hope it makes sense )
Here is code I have at the moment
Thank you
EH
Code:
if (os_type == os_android) {
// Display Properties
ideal_width = 720;
ideal_height = 0;
aspect_ratio = display_get_width()/display_get_height();
ideal_height = round(ideal_width/aspect_ratio);
// Check for odd number
if (ideal_height && 1) ideal_height++;
// Create camera
global.camera = camera_create_view(108, 67, ideal_width, ideal_height, 0, -1, -1, -1, 0, 0);
for (var i = 1; i <= room_last; i++)
{
if(room_exists(i)){
// enable view and setup viewport
room_set_view_enabled(i, true)
room_set_viewport(i, 0, true, 0, 0, ideal_width, ideal_height);
// set camera for room
room_set_camera(i, 0, global.camera);
}
}
surface_resize(application_surface,ideal_width,ideal_height);
window_set_size(ideal_width,ideal_height);
}