Bug 210767 - PATCH: fix highscore saving
PATCH: fix highscore saving
Product: Fedora
Classification: Fedora
Component: rocksndiamonds (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Tom "spot" Callaway
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2006-10-14 10:49 EDT by Hans de Goede
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-11-21 11:38:24 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Patch fixing highscore saving (887 bytes, patch)
2006-10-14 10:49 EDT, Hans de Goede
no flags Details | Diff
PATCH allow Y and N as answer to yes/no questions (575 bytes, patch)
2006-10-14 10:59 EDT, Hans de Goede
no flags Details | Diff
PATCH: make alt+enter toggle fullscreen/windowed (2.79 KB, patch)
2006-10-14 10:59 EDT, Hans de Goede
no flags Details | Diff

  None (edit)
Description Hans de Goede 2006-10-14 10:49:57 EDT

About a week ago I've packaged mirrormagic, which is from the same author as
rocksndiamonds. Since highscore saving didn't work in mirrormagic I took a look
at how the rocksndiamonds package fixes this.

However the rocksndiamonds package doesn't fix it. As currently packaged
rocksndiamonds wants to save its highscores to /var/games/rocksndiamonds,
however this dir is 755 root root, thus rocksndiamonds cannot write to it.

Due to the way rocksndiamonds saves it highscores, save sgid games usage also is
not an option, this I've decided to patch rocksndiamonds so that the highscores
get saved on a per user basis to ~/.rocksndiamonds. While not ideal this is
better then no highscore saving at all.

The attached rocksndiamonds-3.2.2-highscore.patch, does this. Notice that in
order for this to work you must add " -DUSE_USERDATADIR_FOR_COMMONDATA" to the
EXTRA_CFLAGS arguments to make. The patch is written in this way for upstream
merging. When this patch is applied the spec file should no longer create let
alone add to %files the /var/games/rocksndiamonds dir.


When packaging magicmirror I also did 2 other improvements to it, which also
apply pretty much one on one to rocksndiamonds:

* rocksndiamonds-3.2.2-yesno.patch
Allow the user to answer yes/no questions (like the one asked when quiting) with
the 'Y' and 'N' keys in addition to Enter / ESC.

* rocksndiamonds-3.2.2-fstoggle.patch
Allow the user to change from fullscreen to windowed mode and vica versa at any
time by pressing alt+enter

Let me know if you want these 2 additional patches in a seperate bug. I've send
all 3 of them upstream too.
Comment 1 Hans de Goede 2006-10-14 10:49:57 EDT
Created attachment 138508 [details]
Patch fixing highscore saving
Comment 2 Hans de Goede 2006-10-14 10:59:00 EDT
Created attachment 138509 [details]
PATCH allow Y and N as answer to yes/no questions
Comment 3 Hans de Goede 2006-10-14 10:59:34 EDT
Created attachment 138510 [details]
PATCH: make alt+enter toggle fullscreen/windowed
Comment 4 Hans de Goede 2006-10-25 03:49:15 EDT

I've send these upstream and upstream likes and will apply both the highscore
and yesno patch, the fullscreen toggle patch isn't necessary as it turns out
that rocksndiamonds already has that capability since 3.2.2 .

I can push out an update of rocksndiamonds with the other 2 patches applied if
you're short on time.
Comment 5 Hans de Goede 2006-11-13 07:36:00 EST
Tom, as already reported the 2 patches which I would like to see added to the FE
rocksndiamonds package have been accepted by upstream. I esp. would like to see
the highscore saving fixed.

Is it ok if I add these 2 patches to FE CVS and request a build for this?
Comment 6 Tom "spot" Callaway 2006-11-21 11:38:24 EST
Sorry for the delay in applying these patches, when CVS came back up today, I
committed and built new packages.

Note You need to log in before you can comment on or make changes to this bug.