Skip to content

Game List: Added Ability to Manually Edit Play Time#14085

Open
Shaheen2323 wants to merge 2 commits intoPCSX2:masterfrom
Shaheen2323:edit-playtime
Open

Game List: Added Ability to Manually Edit Play Time#14085
Shaheen2323 wants to merge 2 commits intoPCSX2:masterfrom
Shaheen2323:edit-playtime

Conversation

@Shaheen2323
Copy link

Description of Changes

Added the option/ability to manually edit play time if needed in non Big Picture Mode (Qt).
image
image
image
image

Rationale behind Changes

If a user accidentally resets their play time, or if they would like to retain their play time on different devices (e.g., a desktop and a handheld PC), they can now manually edit the play time (Resolves #13007).

Suggested Testing Steps

  • I've already tried almost a hundred different combinations (hours, minutes, seconds), as well as resetting the play time first and/or after editing.
  • I've tried some edge cases (invalid input (negative, characters, etc.), min and max, etc.)
  • I've tried canceling out at different stages (editing hours, minutes, or seconds).
  • Try editing playtime.dat before, after, and at the same time as manually editing in the app, to see if anything breaks. I couldn't find any issues.
  • Try editing on different days, and see if "Last Played" breaks.

Did you use AI to help find, test, or implement this issue or feature?

No.

I can try to add this feature to the Big Picture Mode (FSUI) as well, but I had a bit of trouble wrapping my head around getting things to work with ImGui, as I don't have any experience with it. If you would like me to try some more, let me know, but if someone else wants to do it, feel free to do so.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for submitting a contribution to PCSX2

As this is your first pull request, please be aware of the contributing guidelines.

Additionally, as per recent changes in GitHub Actions, your pull request will need to be approved by a maintainer before GitHub Actions can run against it. You can find more information about this change here.

Please be patient until this happens. In the meantime if you'd like to confirm the builds are passing, you have the option of opening a PR on your own fork, just make sure your fork's master branch is up to date!

@refractionpcsx2
Copy link
Member

Could this not all be done in the same dialogue instead of having 3 separate ones? It seems a little cumbersome to have to go through so many different dialogues, you could easily put hours, minutes and seconds next to each other and reference them separately.

@Shaheen2323
Copy link
Author

Could this not all be done in the same dialogue instead of having 3 separate ones? It seems a little cumbersome to have to go through so many different dialogues, you could easily put hours, minutes and seconds next to each other and reference them separately.

I agree with you on that. The reason I did three separate dialogues is that it was the easiest way to implement this feature while forcing valid input (i.e., ensuring only valid inputs come in). I'll work on it a bit more to see if I can come up with a better solution. One way I'm thinking is to take a single string input and parse it into separate parts after (into hours, minutes, and seconds), and another way is to write a custom dialogue. If you have any suggestions or ideas, let me know.

@Calinou
Copy link

Calinou commented Mar 6, 2026

To be fair, editing the number of seconds of playtime is probably not needed either. We can reset the existing seconds component of the playtime to 0 when it's edited, and only ask for hours and minutes.

If you want to simplify things further, you could only expose an hours field but allow floating-point values, so that minutes can be specified like 6.5 for 6 hours and 30 minutes. Most game launchers like Steam already display playtime in this fashion.

@Shaheen2323
Copy link
Author

To be fair, editing the number of seconds of playtime is probably not needed either. We can reset the existing seconds component of the playtime to 0 when it's edited, and only ask for hours and minutes.

If you want to simplify things further, you could only expose an hours field but allow floating-point values, so that minutes can be specified like 6.5 for 6 hours and 30 minutes. Most game launchers like Steam already display playtime in this fashion.

That's actually a great solution. I'll work on it once I get the chance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request]: The abillity to manually edit playtime.

4 participants