L
lee
Guest
My game has some performance problem in old android, ios phone. (Galaxy 5 ok but galaxy4 has some lag)
So I used below function.
Then it boosts fps significantly! But I used application_surface for making pause.
I got a error for no existence application_surface.
My code is like this
So I used for pause
But it has a bug in android.(image is cropped) and slow.
Are there any way for making pause without using appliaction_surface or screen_save_part?
or is there any way make application_surface immediately?
I'm sorry for poor english.
So I used below function.
Code:
application_surface_enable(false);
I got a error for no existence application_surface.
My code is like this
Code:
application_surface_enable(true);
var ret = -1;
var sfc_width = surface_get_width(application_surface);
var sfc_height = surface_get_height(application_surface);
// Create drawing surface
var sfc = surface_create(sfc_width,sfc_height);
surface_set_target(sfc);
// Clear screen;
draw_set_colour_write_enable(false,false,false,true);
draw_clear(c_black);
draw_rectangle_colour(0,0,sfc_width,sfc_height,c_black,c_black,c_black,c_black,false);
draw_set_colour_write_enable(true,true,true,false);
draw_surface(application_surface,0,0);
ret =background_create_from_surface(sfc,0,0,sfc_width,sfc_height,false,false);
surface_reset_target();
draw_set_colour_write_enable(true,true,true,true);
surface_free(sfc);
Code:
screen_save_part("pauseBG.png",0,0,display_get_width(),display_get_height());
Are there any way for making pause without using appliaction_surface or screen_save_part?
or is there any way make application_surface immediately?
I'm sorry for poor english.
Last edited by a moderator: