mirror of
https://github.com/Oibaf66/uae-wii.git
synced 2024-11-22 10:39:19 +01:00
Added enable_smb option and removed some warnings
This commit is contained in:
parent
5a42372c0f
commit
3477c5c9ea
@ -855,10 +855,11 @@ static int cfgfile_parse_host (struct uae_prefs *p, char *option, char *value)
|
||||
//if (cfgfile_yesno (option, value, "wii_use_mario_kart_wheel", &p->use_wheel_input))
|
||||
//return 1;
|
||||
if (cfgfile_intval (option, value, "wii_port", &p->Port, 1)) return 1;
|
||||
if (cfgfile_string (option, value, "user", &p->SmbUser, 32)
|
||||
|| cfgfile_string (option, value, "password", &p->SmbPwd,32)
|
||||
|| cfgfile_string (option, value, "share_name", &p->SmbShare, 32)
|
||||
|| cfgfile_string (option, value, "smb_ip", &p->SmbIp, 32)) return 1;
|
||||
if (cfgfile_yesno (option, value, "smb_enable", &p->smb_enable)) return 1;
|
||||
if (cfgfile_string (option, value, "user", p->SmbUser, 32)
|
||||
|| cfgfile_string (option, value, "password", p->SmbPwd,32)
|
||||
|| cfgfile_string (option, value, "share_name", p->SmbShare, 32)
|
||||
|| cfgfile_string (option, value, "smb_ip", p->SmbIp, 32)) return 1;
|
||||
|
||||
#endif
|
||||
if (cfgfile_yesno (option, value, "logfile", &p->logfile))
|
||||
@ -2481,6 +2482,7 @@ void default_prefs (struct uae_prefs *p, int type)
|
||||
|
||||
p->use_wheel_input = 0;
|
||||
#ifdef GEKKO
|
||||
p->smb_enable = 0;
|
||||
strcpy (p->SmbUser,"User");
|
||||
strcpy (p->SmbPwd, "Password");
|
||||
strcpy (p->SmbShare, "Share");
|
||||
|
@ -119,10 +119,12 @@ int msgInfo(char *text, int duration, SDL_Rect *irc)
|
||||
return 1;
|
||||
}
|
||||
|
||||
int msgKill(SDL_Rect *rc)
|
||||
/*
|
||||
void msgKill(SDL_Rect *rc)
|
||||
{
|
||||
SDL_UpdateRect(real_screen, rc->x, rc->y, rc->w,rc->h);
|
||||
}
|
||||
*/
|
||||
|
||||
int msgYesNo(char *text, int default_opt, int x, int y)
|
||||
{
|
||||
@ -132,9 +134,9 @@ int msgYesNo(char *text, int default_opt, int x, int y)
|
||||
SDL_Rect rc;
|
||||
SDL_Rect brc;
|
||||
uint32_t key;
|
||||
int old;
|
||||
//int old;
|
||||
|
||||
old = default_opt;
|
||||
//old = default_opt;
|
||||
|
||||
if (x < 0)
|
||||
X = (FULL_DISPLAY_X /2) - (len / 2 + 1)*12;
|
||||
@ -585,6 +587,7 @@ static void select_one(menu_t *p_menu, int sel)
|
||||
select_next(p_menu, 0, 1);
|
||||
}
|
||||
|
||||
/*
|
||||
static int is_submenu_title(menu_t *p_menu, int n)
|
||||
{
|
||||
if (n+1 >= p_menu->n_entries)
|
||||
@ -592,7 +595,7 @@ static int is_submenu_title(menu_t *p_menu, int n)
|
||||
else
|
||||
return IS_SUBMENU(p_menu->pp_msgs[n+1]);
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
static void menu_init_internal(menu_t *p_menu, const char *title,
|
||||
TTF_Font *p_font, const char **pp_msgs,
|
||||
@ -897,7 +900,7 @@ int menu_select(const char **msgs, int *submenus)
|
||||
}
|
||||
|
||||
static const char *menu_select_file_internal(const char *dir_path,
|
||||
int x, int y, int x2, int y2,const char *selected_file, int which)
|
||||
int x, int y, int x2, int y2, const char *selected_file, int which)
|
||||
{
|
||||
const char **file_list = get_file_list(dir_path);
|
||||
char *sel;
|
||||
|
@ -44,7 +44,7 @@ const char *menu_select_file_start(const char *dir_path, const char **d64_name);
|
||||
|
||||
uint32_t menu_wait_key_press(void);
|
||||
|
||||
extern int msgKill(SDL_Rect *rc);
|
||||
extern void msgKill(SDL_Rect *rc);
|
||||
extern int msgInfo(char *text, int duration, SDL_Rect *rc);
|
||||
|
||||
extern int msgYesNo(char *text, int def,int x, int y);
|
||||
|
@ -247,6 +247,7 @@ struct uae_prefs {
|
||||
int use_wheel_input;
|
||||
int logfile;
|
||||
#ifdef GEKKO
|
||||
int smb_enable;
|
||||
char SmbUser[32];
|
||||
char SmbPwd[32];
|
||||
char SmbShare[32];
|
||||
|
18
src/main.c
18
src/main.c
@ -243,7 +243,7 @@ static void fix_options (void)
|
||||
if ((currprefs.gfxmem_size & (currprefs.gfxmem_size - 1)) != 0
|
||||
|| (currprefs.gfxmem_size != 0 && (currprefs.gfxmem_size < 0x100000 || currprefs.gfxmem_size > 0x2000000)))
|
||||
{
|
||||
write_log ("Unsupported graphics card memory size %lx!\n", currprefs.gfxmem_size);
|
||||
write_log ("Unsupported graphics card memory size %lx!\n", (long unsigned int) currprefs.gfxmem_size);
|
||||
currprefs.gfxmem_size = 0;
|
||||
err = 1;
|
||||
}
|
||||
@ -497,11 +497,11 @@ static void parse_cmdline (int argc, char **argv)
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
static void parse_user_conf_file(const char *extension)
|
||||
{
|
||||
/* FIXME! ska: This is temporary, and will be removed when you can
|
||||
* pass command line options in meta.xml for the homebrew channel */
|
||||
// FIXME! ska: This is temporary, and will be removed when you can
|
||||
// pass command line options in meta.xml for the homebrew channel
|
||||
char user_options[255] = "";
|
||||
char *user_argv[] = {"program", "-f", user_options};
|
||||
#ifdef OPTIONS_IN_HOME
|
||||
@ -515,11 +515,11 @@ static void parse_user_conf_file(const char *extension)
|
||||
strcat(user_options, OPTIONSFILENAME);
|
||||
strcat(user_options, extension);
|
||||
|
||||
/* Allow the user uaerc to override the default one */
|
||||
parse_cmdline (3, user_argv);
|
||||
/* Until here */
|
||||
// Allow the user uaerc to override the default one
|
||||
//parse_cmdline (3, user_argv);
|
||||
// Until here
|
||||
}
|
||||
|
||||
*/
|
||||
static void parse_cmdline_and_init_file (int argc, char **argv)
|
||||
{
|
||||
char *home;
|
||||
@ -1106,7 +1106,7 @@ int main (int argc, char **argv)
|
||||
cfgfile_load (&currprefs, SMBFILENAME, 0);
|
||||
printf("\n");
|
||||
|
||||
if (networkisinit) ConnectShare();
|
||||
if (networkisinit && currprefs.smb_enable) ConnectShare();
|
||||
|
||||
sleep(3);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user