* Use tooltip for hack
* Update string of previous hack
* Remove unused hack
Note: hack_sprite_check requires 3 states (and potentially others hack too) but
I don't know how to do it. It likely requires a "scale button"
It works as bad as a "clever" implementation.
It seems to be enough for games such as venus/taisho-monoke/FFX
Note: it might creates glitches. Code will never be nice, so it is just
a trade-off
this is actually not a FTW issue but rather a console sources issue.
the console log sources are not c++ classes and therefore don't get initialized
other than when [attempting to] loading them from the ini file (where if the ini
doesn't exist then they get their default values). however, during first time
wizard, when choosing "overwrite", the console sources are saved without ever
getting loaded and so end up without the default values applied (so all sources
as disabled).
this patch makes sure that if we're saving the conlog sources before ever
attempting to load them, they'll get saved with the correct default values.
-1 is annoying because minimum value is 0. Instead to add more logic,
let's try to use 0 which seems to be good enough (fix regressions on DQ8/AT)
Unfortunately it causes a mini regression on taisho-mononoke. Rotation of sprite is done with 2 triangles.
Potentially previous value wrongly recover this section.
Tekken is broken with setting UserHacks_round_sprite_offset = 2 use 1 instead.
=> game use upscaling internaly so my rounding of coordinate break everything
Yakuza uses float coordinate but this hack only correct the integer coordinate
=> the solution will be to add a dedicated hack for this game.
Colin3 got a regression but I don't know when...
PS2 uses a -0.5 offset before sampling so texels must be rounded to half-pixel boundary
If fixes glitches on Venus and taisho-mononoke
Note: I didn't fixed yet texture render in reverse because I don't have any test for it.
UserHacks_round_sprite_offset = 1 <= enable correction of flat sprites
UserHacks_round_sprite_offset = 2 <= enable correction of all sprites (better on a couple of dump but not sure of the consequence)
I completely redo the algorithm. This time I do the projection and
interpolation of the 2 extrem vertex. This way I can compute the min/max
valid texture coordinate.
It gives stronger guarantee that texture sampling will be done inside the texture.
However it might have a performance impact, likely reasonable because it
is limited to sprite vertex.
A big thanks you to all people that provide me GS dump and test reports.
It is replacement of the previous hack (UserHacks_stretch_sprite). Don't enable both in the same time!
The idea of the hack is to move the sprite to the pixel boundary. It
avoids most of rounding issue. It also rescales verticaly the sprite (avoid horizontal line on ace combat).
I don't like this rescaling maybe we can limit it to only 1 pixels.
On my limited testcase, results are much better with any upscaling factor.
I still have a bad line in Kingdom heart. If you have issue with others
game please provide us a GS dump.
there was already code for this, but it was broken due to:
- the message is WM_SYSCOMMAND and wParam is SC_SCREENSAVE etc.
- GSPanel doesn't get WM_SYSCOMMAND - GSFrame does.
- also disabled screen saver while paused if not set to hide the GS window.
- it's an ugly hack where windows keeps trying to activate the screen saver
every few seconds but such code prevents it (Lilypad has the same hack).
the new code uses windows API which was designed for this.
the screen saver is now disabled while the window is focused and the emulation
is running. it's on by defauly and without GUI - the same as with normal games.
this patch addresses Windows only, but adds a placeholder for future
implementations for other platforms.