Reset Res, Version 1.0

This is a wrapper to prevent programs from crashing and leaving X in a lower
resolution than normal. This is mainly noticeable in games.

Running:
To use, simply run ./reset_res.py the_game_you_want_to_run -arguments
For example, "./reset_res.py p47 -nosound" will act the same as
"p47 -nosound", except that if p47 crashes, the resolution will be restored from
640x480 to whatever you have. (I don't think there are any crash bugs in
p47, though.) Obviously, this only is useful when the program
in question runs fullscreen.


Hacking:
reset_res.py is a wrapper that finds the current resolution, runs the program in
question, then restores the resolution if needed. It uses a xvidtune modified
to allow changes to arbitrary resolutions. To use this modified xvidtune,
run xvidtune -setmode modeline. Note that this modeline must be properly escaped
and quoted, as there are always spaces and quotes in modelines. See the code
in reset_res for an example.

To compile this modified xvidtune, you will need the xfree86 source (or at
least the headers). I used version 4.3.0 as the basis for this version.

My changes to xvidtune are under the same license as the rest of the program.
(BSD with the advertising clause) reset_res.py and testing.c are under the
GPL, but there's really no reason to make them proprietary, anyway.

Bugs:
I'm not sure how well this works if you have flags in your modelines. It should
work, but if you have two modelines, with only flags differentiating them,
the modified xvidtune may pick the wrong one.