When running in fullscreen mode, you may now ask Tux Paint to display at the screen's (more precisely, the operating system's) current resolution.

This commit is contained in:
William Kendrick 2007-05-14 16:24:01 +00:00
parent bc63859a5a
commit 7a0582aee2
4 changed files with 90 additions and 12 deletions

View file

@ -9,7 +9,7 @@ http://www.newbreedsoftware.com/tuxpaint/
$Id$ $Id$
2007.May.3 (0.9.17) 2007.May.14 (0.9.17)
* Tool Improvements: * Tool Improvements:
------------------ ------------------
@ -54,6 +54,12 @@ $Id$
+ Star + Star
+ Triangle (up and down) + Triangle (up and down)
* System-related improvements:
----------------------------
* When running in fullscreen mode, you may now ask Tux Paint to display
at the screen's (more precisely, the operating system's) current
resolution. Either use both "fullscreen=yes" and "native=yes" in the
config file, or "--fullscreen --native" on the command-line.
* Documentation Improvements: * Documentation Improvements:
--------------------------- ---------------------------

View file

@ -9,7 +9,7 @@
bill@newbreedsoftware.com bill@newbreedsoftware.com
http://www.tuxpaint.org/ http://www.tuxpaint.org/
May 6, 2007 May 14, 2007
-------------------------------------------------------------------------- --------------------------------------------------------------------------
@ -71,6 +71,10 @@ Windows Users
fullscreen=yes fullscreen=yes
Run the program in full screen mode, rather than in a window. Run the program in full screen mode, rather than in a window.
fullscreen=native
Run the program in full screen mode. Additionally, assume the
screen's current resolution (set by the operating system).
windowsize=SIZE windowsize=SIZE
Run the program at a different size (in windowed mode) or at a Run the program at a different size (in windowed mode) or at a
@ -89,6 +93,12 @@ Windows Users
* 768x1024 * 768x1024
* 1600x1200 * 1600x1200
native=yes
When running Tux Paint in fullscreen mode, this assumes the
screen's current resolution (overriding any "windowsize"
option), as set by the operating system.
nosound=yes nosound=yes
Disable sound effects. (Note: Pressing [Alt] + [S] cannot be Disable sound effects. (Note: Pressing [Alt] + [S] cannot be
used to reenable sounds if they were disabled using this used to reenable sounds if they were disabled using this
@ -528,6 +538,7 @@ Windows Users
--fullscreen --fullscreen
--WIDTHxHEIGHT --WIDTHxHEIGHT
--native
--startblank --startblank
--nosound --nosound
--noquit --noquit

View file

@ -23,7 +23,7 @@ New Breed Software</p>
<a href="http://www.tuxpaint.org/">http://www.tuxpaint.org/</a></p> <a href="http://www.tuxpaint.org/">http://www.tuxpaint.org/</a></p>
<p>May 6, 2007</p> <p>May 14, 2007</p>
</center> </center>
@ -105,6 +105,12 @@ New Breed Software</p>
Run the program in full screen mode, rather than in a window. Run the program in full screen mode, rather than in a window.
</dd> </dd>
<dt><code><b>fullscreen=native</b></code></dt>
<dd>
Run the program in full screen mode. Additionally, assume the
screen's current resolution (set by the operating system).
</dd>
<dt><code><b>windowsize=<i>SIZE</i></b></code></dt> <dt><code><b>windowsize=<i>SIZE</i></b></code></dt>
<dd> <dd>
<p>Run the program at a different size (in windowed mode) or <p>Run the program at a different size (in windowed mode) or
@ -125,6 +131,13 @@ New Breed Software</p>
</p> </p>
</dd> </dd>
<dt><code><b>native=yes</b></code></dt>
<dd>
<p>When running <i>Tux&nbsp;Paint</i> in fullscreen mode, this
assumes the screen's current resolution (overriding any
"<code>windowsize</code>" option), as set by the operating system.
</dd>
<dt><code><b>nosound=yes</b></code></dt> <dt><code><b>nosound=yes</b></code></dt>
<dd> <dd>
Disable sound effects. (Note: Pressing <b>[Alt]</b>&nbsp;+&nbsp;<b>[S]</b> Disable sound effects. (Note: Pressing <b>[Alt]</b>&nbsp;+&nbsp;<b>[S]</b>
@ -841,6 +854,7 @@ New Breed Software</p>
<dt><code><b> <dt><code><b>
--fullscreen<br> --fullscreen<br>
--<i>WIDTH</i>x<i>HEIGHT</i><br> --<i>WIDTH</i>x<i>HEIGHT</i><br>
--native<br>
--startblank<br> --startblank<br>
--nosound<br> --nosound<br>
--noquit<br> --noquit<br>

View file

@ -22,7 +22,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
(See COPYING.txt) (See COPYING.txt)
June 14, 2002 - May 10, 2007 June 14, 2002 - May 14, 2007
$Id$ $Id$
*/ */
@ -799,7 +799,7 @@ static void update_canvas(int x1, int y1, int x2, int y2)
/* Globals: */ /* Globals: */
static int fullscreen, disable_quit, simple_shapes, static int fullscreen, native_screensize, disable_quit, simple_shapes,
disable_print, print_delay, only_uppercase, promptless_save, grab_input, disable_print, print_delay, only_uppercase, promptless_save, grab_input,
wheely, keymouse, mouse_x, mouse_y, wheely, keymouse, mouse_x, mouse_y,
mousekey_up, mousekey_down, mousekey_left, mousekey_right, mousekey_up, mousekey_down, mousekey_left, mousekey_right,
@ -5311,8 +5311,7 @@ static void show_usage(FILE * f, char *prg)
"Usage: %s {--usage | --help | --version | --copying}\n" "Usage: %s {--usage | --help | --version | --copying}\n"
"\n" "\n"
" %s [--windowed | --fullscreen]\n" " %s [--windowed | --fullscreen]\n"
" %s [--640x480 | --800x600 | --1024x768 |\n" " %s [--WIDTHxHEIGHT | --native]\n"
" %s --1280x1024 | --1400x1050 | --1600x1200]\n"
" %s [--startblank | --startlast ]\n" " %s [--startblank | --startlast ]\n"
" %s [--sound | --nosound] [--quit | --noquit]\n" " %s [--sound | --nosound] [--quit | --noquit]\n"
" %s [--print | --noprint] [--complexshapes | --simpleshapes]\n" " %s [--print | --noprint] [--complexshapes | --simpleshapes]\n"
@ -5339,7 +5338,7 @@ static void show_usage(FILE * f, char *prg)
prg, prg, prg, prg,
blank, blank, blank, blank, blank, blank,
blank, blank, blank, blank, blank, blank,
blank, blank, blank, blank, blank, blank, blank, blank, blank, blank, blank, blank, blank, blank, blank, blank, blank,
#ifdef WIN32 #ifdef WIN32
blank, blank,
#endif #endif
@ -6047,6 +6046,7 @@ static void setup(int argc, char *argv[])
#else #else
fullscreen = 0; fullscreen = 0;
#endif #endif
native_screensize = 0;
noshortcuts = 0; noshortcuts = 0;
dont_do_xor = 0; dont_do_xor = 0;
keymouse = 0; keymouse = 0;
@ -6273,6 +6273,10 @@ static void setup(int argc, char *argv[])
WINDOW_WIDTH = w; WINDOW_WIDTH = w;
WINDOW_HEIGHT = h; WINDOW_HEIGHT = h;
} }
else if (strcmp(argv[i], "--native") == 0)
{
native_screensize = 1;
}
else if (strcmp(argv[i], "--nooutlines") == 0) else if (strcmp(argv[i], "--nooutlines") == 0)
{ {
dont_do_xor = 1; dont_do_xor = 1;
@ -6872,9 +6876,6 @@ static void setup(int argc, char *argv[])
} }
setup_screen_layout();
/* Set window icon and caption: */ /* Set window icon and caption: */
#ifndef __APPLE__ #ifndef __APPLE__
@ -6886,6 +6887,23 @@ static void setup(int argc, char *argv[])
SDL_ShowCursor (SDL_DISABLE); SDL_ShowCursor (SDL_DISABLE);
#endif #endif
/* Deal with 'native' screen size option */
if (native_screensize)
{
if (!fullscreen)
{
fprintf(stderr, "Warning: Asking for native screensize in a window. Ignoring.\n");
}
else
{
WINDOW_WIDTH = 0;
WINDOW_HEIGHT = 0;
}
}
/* Open Window: */ /* Open Window: */
if (fullscreen) if (fullscreen)
@ -6907,6 +6925,16 @@ static void setup(int argc, char *argv[])
fullscreen = 0; fullscreen = 0;
} }
else
{
/* Get resolution if we asked for native: */
if (native_screensize)
{
WINDOW_WIDTH = screen->w;
WINDOW_HEIGHT = screen->h;
}
}
} }
@ -6937,6 +6965,11 @@ static void setup(int argc, char *argv[])
} }
/* (Need to do this after native screen resolution is handled) */
setup_screen_layout();
////////// quickly: title image, version, progress bar, and watch cursor ////////// quickly: title image, version, progress bar, and watch cursor
img_title = loadimage(DATA_PREFIX "images/title.png"); img_title = loadimage(DATA_PREFIX "images/title.png");
@ -10196,7 +10229,8 @@ static void strip_trailing_whitespace(char *buf)
static char *loaddesc(const char *const fname, Uint8 * locale_text) static char *loaddesc(const char *const fname, Uint8 * locale_text)
{ {
char *txt_fname, *extptr; char *txt_fname, *extptr;
char buf[512], def_buf[512]; // doubled to 512 per TOYAMA Shin-Ichi's requested; -bjk 2007.05.10 char buf[512], def_buf[512]; // doubled to 512 per TOYAMA Shin-Ichi's reque
sted; -bjk 2007.05.10
int found, got_first; int found, got_first;
FILE *fi; FILE *fi;
@ -15243,6 +15277,19 @@ static void parse_options(FILE * fi)
{ {
fullscreen = 1; fullscreen = 1;
} }
else if (strcmp(str, "fullscreen=native") == 0)
{
fullscreen = 1;
native_screensize = 1;
}
else if (strcmp(str, "native=yes") == 0)
{
native_screensize = 1;
}
else if (strcmp(str, "native=no") == 0)
{
native_screensize = 0;
}
else if (strcmp(str, "fullscreen=no") == 0 || else if (strcmp(str, "fullscreen=no") == 0 ||
strcmp(str, "windowed=yes") == 0) strcmp(str, "windowed=yes") == 0)
{ {