[Scummvm-tracker] [ScummVM] #10239: PSP port incorrect 4:3 aspect radio

damsoftPL trac at scummvm.org
Wed Dec 27 10:00:02 CET 2017


#10239: PSP port incorrect 4:3 aspect radio
------------------------+--------------------
  Reporter:  damsoftPL  |      Owner:  (none)
      Type:  defect     |     Status:  new
  Priority:  normal     |  Component:  Ports
Resolution:             |   Keywords:
      Game:             |
------------------------+--------------------

Comment (by damsoftPL):

 To make 4x3 aspect ratio work properly on PSP one minor change in source
 code needs to be applied.
 I've already recompile ScummVM for PSP with that change and it works
 great.
 The change is needed in backends\platform\psp\display_manager.cpp in the
 calculateScaleParams() method.
 Below the original code and modified by me (I added one condition and one
 assignment)

 Original code:
 {{{
 case KEEP_ASPECT_RATIO: { // maximize the height while keeping aspect
 ratio
                 float aspectRatio =
 (float)_displayParams.screenSource.width /
 (float)_displayParams.screenSource.height;

                 _displayParams.screenOutput.height = PSP_SCREEN_HEIGHT; //
 always full height
                 _displayParams.screenOutput.width =
 (uint32)(PSP_SCREEN_HEIGHT * aspectRatio);

                 if (_displayParams.screenOutput.width > PSP_SCREEN_WIDTH)
 // we can't have wider than the screen
                         _displayParams.screenOutput.width =
 PSP_SCREEN_WIDTH;
         }
         break;
 }}}

 Modified code:
 {{{
 case KEEP_ASPECT_RATIO: { // maximize the height while keeping aspect
 ratio
                 float aspectRatio =
 (float)_displayParams.screenSource.width /
 (float)_displayParams.screenSource.height;

                 if ((float)_displayParams.screenSource.height==200)
                         aspectRatio =
 (float)_displayParams.screenSource.width / (float)240;

                 _displayParams.screenOutput.height = PSP_SCREEN_HEIGHT; //
 always full height
                 _displayParams.screenOutput.width =
 (uint32)(PSP_SCREEN_HEIGHT * aspectRatio);

                 if (_displayParams.screenOutput.width > PSP_SCREEN_WIDTH)
 // we can't have wider than the screen
                         _displayParams.screenOutput.width =
 PSP_SCREEN_WIDTH;
         }
         break;
 }}}

--
Ticket URL: <https://bugs.scummvm.org/ticket/10239#comment:2>
ScummVM <https://bugs.scummvm.org>
ScummVM


More information about the Scummvm-tracker mailing list