Just a note that a similar probing is already done in a user specific location. The background can be changed by dragging an image onto the game. This copies the image to ~/.local/share/gnometris/background.bin. This image is used as background if it exists, otherwise it will fall back to the default image.
Just a note that a similar probing is already done in a user specific location. The background can be changed by dragging an image onto the game. This copies the image to ~/.local/ share/gnometris /background. bin. This image is used as background if it exists, otherwise it will fall back to the default image.
I understand that this may not be what you are looking for exactly but at least similar code is already there for this kind of thing. Look at http:// git.gnome. org/cgit/ gnome-games/ tree/gnometris/ tetris. cpp#n145 to see the actual code.