Opened 10 years ago

Closed 7 years ago

Last modified 6 months ago

#8971 closed patch

PS2 : RTL for all games

Reported by: sunmax Owned by:
Priority: normal Component: Port: PS2
Keywords: Cc:
Game:

Description

This patch enforces RTL on game quit as requested by many ScummVM/PS2 users.

Ticket imported from: #2659835. Ticket imported from: patches/1076.

Attachments (1)

ps2-rtl.patch (2.0 KB) - added by sunmax 10 years ago.
ps2-rtl.patch

Download all attachments as: .zip

Change History (12)

Changed 10 years ago by sunmax

Attachment: ps2-rtl.patch added

ps2-rtl.patch

comment:1 Changed 10 years ago by lordhoto

That quit flag reset looks pretty much like an ugly hack :-/. I guess you should rather subclass or edit the EventManager to handle QUIT events like RTL events and adapt shoudRTL and shouldQuit to return true when RTL is requested so every engine is forced to do so. Of course that's quite hacky too, but IMHO an addition like resetQuit could suggest to people that one could just ignore/reset quit events then they want to, which should definitely not be the case.

Also I would prefer a comment why that error flag check and shoudRTL check is disable for PS2.

comment:2 Changed 10 years ago by sunmax

Hey Johannes,

a) do we have a general method to simply tell to the games to always RTL on Quit?

b) if we subclass EventManager (is there any backend that is currently doing this?)
this would benefit only PS2. Assuming this change is a benefit ;-)

c) We will still need to reset quit to false, otherwise the game will immediately leave
the next time that you try to run it. I see the risks of the resetQuit method.
Please suggest a better way to set quit back to false.

Thanks!
-max

comment:3 Changed 10 years ago by sunmax

>> why that error flag check and shoudRTL check is disable for PS2

'coz shouldRTL is always true (since we are enforcing it) and then
the binary AND is always false.

No need to check for a condition that will always fail.

On a refined version of the patch we should have something like a "__FORCE_RTL__"
define (so that every backend is free to leverage it) and only in this case
we would skip the check, assuming we want to implement it this way.

Ciao,
-max

comment:4 Changed 10 years ago by sunmax

Hey Johannes,

a) do we have a general method to simply tell to the games to always RTL on Quit?

b) if we subclass EventManager (is there any backend that is currently doing this?)
this would benefit only PS2. Assuming this change is a benefit ;-)

c) We will still need to reset quit to false, otherwise the game will immediately leave
the next time that you try to run it. I see the risks of the resetQuit method.
Please suggest a better way to set quit back to false.

Thanks!
-max

comment:5 Changed 10 years ago by sunmax

Hey Johannes,

a) do we have a general method to simply tell to the games to always RTL on Quit?

b) if we subclass EventManager (is there any backend that is currently doing this?)
this would benefit only PS2. Assuming this change is a benefit ;-)

c) We will still need to reset quit to false, otherwise the game will immediately leave
the next time that you try to run it. I see the risks of the resetQuit method.
Please suggest a better way to set quit back to false.

Thanks!
-max

comment:6 Changed 10 years ago by lordhoto

a) Not currently. I don't know how useful that would be for desktop ports anyway. All I can say is that I think if the dialog asks for "Quit" it should really "Quit" ScummVM on desktop ports.

b) Yeah only PS2 would take advantage of it so far.

c) None yet, I thought it might be better to handle that internally in EventManager, when wanting forced RTL.

Oh btw. sorry I didn't monitor this item, thus I didn't saw the changes anytime sooner :-/

comment:7 Changed 10 years ago by sev-

What is the status of this item?

comment:8 Changed 10 years ago by sunmax

Hi there!

The patch was applied for 0.13.1 as compile-time define FORCE_RTL
(enabled by default in PS2 Makefile). A cleaner implementation could
be sought as soon as we are done with more urgent PS2 issues, eg:

- stack corruption

- scummv.ini corruption (might be related to the previous one)

Thanks for following up!
-max

comment:9 Changed 7 years ago by fuzzie

Status: newclosed

comment:10 Changed 7 years ago by fuzzie

Closing this, since it was applied.

comment:11 Changed 6 months ago by digitall

Component: Port: PS2
Note: See TracTickets for help on using tickets.