Opened 15 years ago

Closed 12 years ago

Last modified 6 years ago

#8971 closed patch

PS2 : RTL for all games

Reported by: sunmax Owned by:
Priority: normal Component: Port: PS2
Version: 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 15 years ago.
ps2-rtl.patch

Download all attachments as: .zip

Change History (12)

by sunmax, 15 years ago

Attachment: ps2-rtl.patch added

ps2-rtl.patch

comment:1 by lordhoto, 15 years ago

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 by sunmax, 15 years ago

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 by sunmax, 15 years ago

>> 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 by sunmax, 15 years ago

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 by sunmax, 15 years ago

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 by lordhoto, 15 years ago

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 by sev-, 15 years ago

What is the status of this item?

comment:8 by sunmax, 15 years ago

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 by fuzzie, 12 years ago

Status: newclosed

comment:10 by fuzzie, 12 years ago

Closing this, since it was applied.

comment:11 by digitall, 6 years ago

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