• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Discussion "screen_save_part" not working in fullscreen

D

Dani

Guest
Hello!

Please, take a look at screen_save_part function because is not working at all in fullscreen mode and it even crashes sometimes.

I have a script for taking and sharing screenshots on Steam that works perfectly in GMS 1.x:

Code:
var filename =  working_directory + "screenshot_" +
                    string(current_year) + "-" +
                    string(current_month) + "-" +
                    string(current_day) + "_" +
                    string(current_hour) + "-" +
                    string(current_minute) + "-" +
                    string(current_second) +
                    ".png";
    
if (window_get_fullscreen())
{
    screen_save_part(filename,global.surface_x,global.surface_y,view_wport[0],view_hport[0]);
}
else
{
    screen_save(filename);
}

steam_send_screenshot(filename, view_wport[0], view_hport[0]);

The same script, adapted to GMS 2, is not working in fullscreen mode:

Code:
var filename =  working_directory + "screenshot_" +
                    string(current_year) + "-" +
                    string(current_month) + "-" +
                    string(current_day) + "_" +
                    string(current_hour) + "-" +
                    string(current_minute) + "-" +
                    string(current_second) +
                    ".png";
  
if (window_get_fullscreen())
{
    screen_save_part(filename,global.surface_x,global.surface_y,view_get_wport(0),view_get_hport(0));
}
else
{
    screen_save(filename);
}

steam_send_screenshot(filename,view_get_wport(0),view_get_hport(0));

Thanks.
 
Top