Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FF7: Fix movies being clipped when uncrop option is enabled #770

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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