skeddles
Member
I'm trying to take a screenshot of my entire room. I pieced together this code from another thread:
The code works, except for one caveat: it takes the screenshot before the screen is done resizing. The screenshot saved looks like the screen before it was resized. If I do it a second time, THEN it gives me the proper screenshot, since the screen is already resized from the last time.
Is there any way for me to wait until the screen is done resizing before saving the screenshot?
GML:
view_xview[7] = 0;
view_yview[7] = 0;
view_wview[7] = room_width;
view_hview[7] = room_height;
view_enabled[7] = true;
window_set_rectangle(0, 0, room_width, room_height);
surface_resize(application_surface, room_width, room_height);
var file = get_save_filename("*.png", "screenshot");
surface_save(application_surface, file);
Is there any way for me to wait until the screen is done resizing before saving the screenshot?