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

Game OSD: Add rotation setting #14019

Merged
merged 9 commits into from
Jun 14, 2018
Merged

Game OSD: Add rotation setting #14019

merged 9 commits into from
Jun 14, 2018

Conversation

garbear
Copy link
Member

@garbear garbear commented Jun 11, 2018

This adds "Rotation" to the list of settings in the Game OSD. RetroPlayer borrowed its geometry math from VP, which unfortunately is completely intertwined with local state. It also failed to handle all view modes for most rotations, resulting in stretched or minified images.

The math in the renderer has now been completely separated from state. In addition to fixing the geometry math, many improvements were made to RetroPlayer, mostly removing and splitting up code.

Motivation and Context

Many games have black screens because RetroPlayer cannot handle images of different sizes. Fixing the geometry is the first step in tackling this bug. My motivation for adding Rotation was initially to test the geometry, but I figured it would be useful to leave in settings.

How Has This Been Tested?

Tested with landscape (8/7) and portrait (4/5) frames. The following view modes are now functioning correctly:

  • Normal: Fits to screen
  • Stretch 4:3: Stretches to 4:3 and fits to screen
  • Fullscreen: Stretches to fill the screen
  • Original: Original size

Screenshots (if appropriate):

Updated game settings in the OSD:
game osd settings

Rotating the game 90 degrees:
90 degree rotation

Stretching a rotated game to fullscreen in the View Modes setting:
fullscreen rotation

Tested in arcade cabinet mode:
arcade cabinet mode

Types of change

  • Bug fix (non-breaking change which fixes an issue)
  • Improvement (non-breaking change which improves existing functionality)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

@garbear garbear added Type: Feature non-breaking change which adds functionality Type: Fix non-breaking change which fixes an issue v18 Leia Component: Games labels Jun 11, 2018
@garbear garbear added this to the Leia 18.0-alpha2 milestone Jun 11, 2018
@garbear garbear changed the title Game OSD: Add rotation setting. Game OSD: Add rotation setting Jun 11, 2018
@jenkins4kodi jenkins4kodi added the Rebase needed PR that does not apply/merge cleanly to current base branch label Jun 12, 2018
@jenkins4kodi jenkins4kodi removed the Rebase needed PR that does not apply/merge cleanly to current base branch label Jun 12, 2018
@garbear
Copy link
Member Author

garbear commented Jun 13, 2018

jenkins build this please

Scaling method is swapped for a std::string, which allows seamless
integration with shader preset paths.

Video filter logic has been encapsulated within CRenderVideoSettings.
This fixes the geometry of 90° and 270° rotations for all view modes:

* Normal: Fits to screen
* Stretch 4:3: Stretches to 4:3 and fits to screen
* Fullscreen: Stretches to fill the screen
* Original: Original size

Geometry from VideoPlayer was heavy intertwined with local state. This
refactors all geometry math into a new class, CRenderUtils. The
operations have been organized and greatly simplified.
@garbear
Copy link
Member Author

garbear commented Jun 14, 2018

jenkins build and merge

@garbear
Copy link
Member Author

garbear commented Jun 14, 2018

build errors unrelated (they both passed the previous run)

@garbear garbear merged commit 74e2c37 into xbmc:master Jun 14, 2018
@garbear garbear deleted the rp-geometry branch June 14, 2018 23:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Games Type: Feature non-breaking change which adds functionality Type: Fix non-breaking change which fixes an issue v18 Leia
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants