mirror of
git://projects.qi-hardware.com/imgv.git
synced 2025-02-17 14:44:44 +02:00
use argv[1] as filename
Signed-off-by: Xiangfu Liu <xiangfu@sharism.cc>
This commit is contained in:
parent
6525c34980
commit
9858e27172
@ -42,8 +42,8 @@ int main(int argc, char *argv[])
|
|||||||
rightPressed,
|
rightPressed,
|
||||||
upPressed,
|
upPressed,
|
||||||
downPressed;
|
downPressed;
|
||||||
char sFilename[255] = "\0",
|
char * sFilename;
|
||||||
sVersion[] = "0.2.1";
|
char sVersion[] = "0.2.1";
|
||||||
double scale_x = 1.0,
|
double scale_x = 1.0,
|
||||||
scale_y = 1.0,
|
scale_y = 1.0,
|
||||||
scale = 1.0;
|
scale = 1.0;
|
||||||
@ -54,10 +54,17 @@ int main(int argc, char *argv[])
|
|||||||
// Process command line
|
// Process command line
|
||||||
if (argc != 2)
|
if (argc != 2)
|
||||||
{
|
{
|
||||||
fprintf (stderr, "\n imgv v%s. Syntax: imgv <image file>\n\n Hotkeys:\n 'f' fit to screen\n 'z' zoom at pixel level\n 'i' zoom in 'o' zoom out\n 'l' rotate left 'r' rotate right\n 'arrows' pan 'ESC' quit\n\n", sVersion);
|
fprintf (stderr, "\n"
|
||||||
|
" imgv v%s. Syntax: imgv <image file>\n\n"
|
||||||
|
" Hotkeys:\n"
|
||||||
|
" 'f' fit to screen\n"
|
||||||
|
" 'z' zoom at pixel level\n"
|
||||||
|
" 'i' zoom in 'o' zoom out\n"
|
||||||
|
" 'l' rotate left 'r' rotate right\n"
|
||||||
|
" 'arrows' pan 'ESC' quit\n\n", sVersion);
|
||||||
exit (1);
|
exit (1);
|
||||||
}
|
}
|
||||||
strncpy (sFilename, argv[1], 254);
|
sFilename = argv[1];
|
||||||
|
|
||||||
// Initialize the SDL library
|
// Initialize the SDL library
|
||||||
if (SDL_Init(SDL_INIT_VIDEO) < 0)
|
if (SDL_Init(SDL_INIT_VIDEO) < 0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user