Skip to content

Commit

Permalink
FF7: Fix right side of screen being clipped during movies when uncrop…
Browse files Browse the repository at this point in the history
… option is enabled
  • Loading branch information
CosmosXIII committed Jan 5, 2025
1 parent 3dd54f3 commit 68b8b4d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -914,7 +914,7 @@ int common_create_window(HINSTANCE hInstance, struct game_obj* game_object)
replace_function((uint32_t)common_externals.assert_calloc, ext_calloc);
#endif

if (widescreen_enabled) widescreen.init();
if (widescreen_enabled || enable_uncrop) widescreen.init();

// Init renderer
newRenderer.init();
Expand Down
14 changes: 6 additions & 8 deletions src/renderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1726,15 +1726,13 @@ void Renderer::setScissor(uint16_t x, uint16_t y, uint16_t width, uint16_t heigh
if (enable_uncrop)
{
bool is_movie_playing = *ff7_externals.word_CC1638 && !ff7_externals.modules_global_object->BGMOVIE_flag;
if((is_movie_playing && widescreen.getMovieMode() == WM_DISABLED))
if(!(is_movie_playing && widescreen.getMovieMode() == WM_DISABLED))
{
return;
}

if(y == 16 && height == 448)
{
scissorOffsetY = getInternalCoordY(0.0);
scissorHeight = getInternalCoordY(480);
if(y == 16 && height == 448)
{
scissorOffsetY = getInternalCoordY(0.0);
scissorHeight = getInternalCoordY(480);
}
}
}

Expand Down

0 comments on commit 68b8b4d

Please sign in to comment.