1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-07-02 03:50:36 +00:00

Fixes letter-boxing offset bug in full screen mode

This commit is contained in:
Galleon 2014-03-30 22:04:33 +11:00
parent 27d753b4d0
commit 05054928b1

View file

@ -29500,21 +29500,21 @@ if (environment_2d__letterbox){
if (environment_2d__letterbox==1){
//vertical stripes
hardware_img_put(-environment_2d__screen_x1,0,-1,environment_2d__screen_height-1,
hardware_img_put(((float)-environment_2d__screen_x1)/environment_2d__screen_x_scale-1.0f,0,-1,environment_2d__screen_height-1,
black_texture, 0,
0,0,0,0,
0,0);
hardware_img_put(environment_2d__screen_width,0,-environment_2d__screen_x1+environment__window_width-1,environment_2d__screen_height-1,
hardware_img_put(environment_2d__screen_width,0,(((float)-environment_2d__screen_x1)+(float)environment__window_width-1.0f)/environment_2d__screen_x_scale+1.0f,environment_2d__screen_height-1,
black_texture, 0,
0,0,0,0,
0,0);
}else{
//horizontal stripes
hardware_img_put(0,-environment_2d__screen_y1,environment_2d__screen_width-1,-1,
hardware_img_put(0,((float)-environment_2d__screen_y1)/environment_2d__screen_y_scale-1.0f,environment_2d__screen_width-1,-1,
black_texture, 0,
0,0,0,0,
0,0);
hardware_img_put(0,environment_2d__screen_height,environment_2d__screen_width-1,-environment_2d__screen_y1+environment__window_height-1,
hardware_img_put(0,environment_2d__screen_height,environment_2d__screen_width-1,(((float)-environment_2d__screen_y1)+(float)environment__window_height-1.0f)/environment_2d__screen_y_scale+1.0f,
black_texture, 0,
0,0,0,0,
0,0);