Project

General

Profile

Actions

Emulator Issues #2500

closed

Code Review Request - Widescreen Hack Tweak

Added by Billiard26 about 14 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
-
Category:
GFX
% Done:

0%

Operating system:
N/A
Issue type:
Feature request
Milestone:
Regression:
No
Relates to usability:
Yes
Relates to performance:
No
Easy:
No
Relates to maintainability:
No
Regression start:
Fixed in:

Description

Purpose of code changes on this branch:
Tweak the "Widescreen Hack":

  • Hack longer assumes the game is running at 4:3 and the user has a
    display of 16:9
  • Attempt to adjust the aspect ratio From either 16:9 or 4:3 ( depending
    on value of g_VideoInitialize.bAutoAspectIs16_9 )
  • Attempt to adjust the aspect ratio To what the user has chosen in the
    "Aspect Ratio" combobox.

[ Aspect Ratio combobox ] :

  • If "Auto" is chosen, the hack will have NO effect in any game.
  • If "Force 16:9" is chosen and a 4:3 game is running, the hack will
    adjust from 4:3 to 16:9 (Hor+).
  • If "Force 16:9" is chosen and a 16:9 game is running, the hack will have
    NO effect.
  • If "Force 4:3" is chosen and a 16:9 game is running, the hack will
    adjust from 16:9 to 4:3 (Vert+).
  • If "Force 4:3" is chosen and a 4:3 game is running, the hack will have
    NO effect.
  • If "Stretch" is chosen, the hack will adjust from the games aspect ratio
    ( either 16:9 or 4:3 ) to the aspect ratio of the user's chosen fullscreen
    resolution. ( using Hor+ or Vert+ ) ( this allows playing of games on 16:10
    or 5:4 displays without a fat or skinny 3d image )

After all, this is a "HACK". It should allow "Hacking" to any
aspect ratio the user wants. Not just 16:9.

When reviewing my code changes, please focus on:
I don't really care for the method I used to get the fullscreen resolution:
sscanf(g_Config.cFSResolution, "%dx%d", &w_fs, &h_fs);
I couldn't find a better/correct method. Maybe someone else can fix that.

Perhaps the entire "UpdateAspectRatioHack" function shouldn't be in
"VertexShaderManager.cpp". Maybe someone knows where it does belong.

Patch Download:
http://billiard.us.to/share/Dolphin/aspect_ratio_tweak.patch

Actions

Also available in: Atom PDF