Scaling cleanup

From vice-emu
Revision as of 16:29, 29 November 2012 by Gpz (talk | contribs) (Created page with "# first the optimal size of the canvas is calculated # then, the window is created of the right size # NO resize message is sent to the window at startup, since the window is...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
  1. first the optimal size of the canvas is calculated
  2. then, the window is created of the right size
  3. NO resize message is sent to the window at startup, since the window

is already of the right size. Instead, a resize message is sent to the window when there's a user action such as enable scale 2x.

Right now 3 sizing models are supported

  1. the canvas size is calculated, then the window fits the canvas. Used

by most ports when HW scaling is off

  1. the canvas size is calculated, the window has an arbitrary width and

height, the image is streched/squeezed. Used by most ports when HW scaling is on

    1. the canvas size is calculated, the window's aspect ratio fits the

canvas', the window has an arbitrary width or height

  1. the canvas size is calculated, the window has an arbitrary width and

height, a black border is added to the image if the window is too big or the image is cropped smartly if the window is too small. Used by Xaw (and in the past by more ports)

Do we really need all 3? The third one is really ugly (and it is the only reason why we have the unnecessary complication of video-viewport).



List of ports: amiga, beos, dos, os/2, osx, *nix, win32, sdl