DrawMainMenu();
+ if (options.drop_file != NULL)
+ PushDropEvent(options.drop_file);
+
#if 0
Debug("internal:path", "SDL_GetBasePath() == '%s'",
SDL_GetBasePath());
options.player_name = NULL;
options.identifier = NULL;
options.level_nr = NULL;
+ options.drop_file = NULL;
options.display_nr = 0;
if (option_arg == next_option)
options_left++;
}
+ else if (strncmp(option, "-drop-file", option_len) == 0)
+ {
+ if (option_arg == NULL)
+ FailWithHelp("option '%s' requires an argument", option_str);
+
+ options.drop_file = getStringCopy(option_arg);
+ if (option_arg == next_option)
+ options_left++;
+ }
else if (strncmp(option, "-verbose", option_len) == 0)
{
options.verbose = TRUE;
SDL_PushEvent((SDL_Event *)&event);
}
+void PushDropEvent(char *file)
+{
+ SDL_DropEvent event;
+
+ SDL_memset(&event, 0, sizeof(event));
+
+ event.type = SDL_DROPBEGIN;
+ event.file = NULL;
+
+ SDL_PushEvent((SDL_Event *)&event);
+
+ event.type = SDL_DROPFILE;
+ event.file = getStringCopy(file);
+
+ SDL_PushEvent((SDL_Event *)&event);
+
+ event.type = SDL_DROPCOMPLETE;
+ event.file = NULL;
+
+ SDL_PushEvent((SDL_Event *)&event);
+}
+
boolean PendingEscapeKeyEvent(void)
{
if (PendingEvent())
char *identifier;
char *level_nr;
+ char *drop_file;
+
int display_nr;
boolean mytapes;
void StartTextInput(int, int, int, int);
void StopTextInput(void);
void PushUserEvent(int, int, int);
+void PushDropEvent(char *);
boolean PendingEscapeKeyEvent(void);
void InitJoysticks(void);
" -g, --graphics DIRECTORY alternative graphics DIRECTORY\n"
" -s, --sounds DIRECTORY alternative sounds DIRECTORY\n"
" -m, --music DIRECTORY alternative music DIRECTORY\n"
+ " --drop-file FILE drop FILE into program window\n"
" --display NR open program window on display NR\n"
" --mytapes use private tapes for tape tests\n"
" -n, --network network multiplayer game\n"