mirror of
https://github.com/Oibaf66/uae-wii.git
synced 2024-11-29 05:54:17 +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))
|
//if (cfgfile_yesno (option, value, "wii_use_mario_kart_wheel", &p->use_wheel_input))
|
||||||
//return 1;
|
//return 1;
|
||||||
if (cfgfile_intval (option, value, "wii_port", &p->Port, 1)) return 1;
|
if (cfgfile_intval (option, value, "wii_port", &p->Port, 1)) return 1;
|
||||||
if (cfgfile_string (option, value, "user", &p->SmbUser, 32)
|
if (cfgfile_yesno (option, value, "smb_enable", &p->smb_enable)) return 1;
|
||||||
|| cfgfile_string (option, value, "password", &p->SmbPwd,32)
|
if (cfgfile_string (option, value, "user", p->SmbUser, 32)
|
||||||
|| cfgfile_string (option, value, "share_name", &p->SmbShare, 32)
|
|| cfgfile_string (option, value, "password", p->SmbPwd,32)
|
||||||
|| cfgfile_string (option, value, "smb_ip", &p->SmbIp, 32)) return 1;
|
|| cfgfile_string (option, value, "share_name", p->SmbShare, 32)
|
||||||
|
|| cfgfile_string (option, value, "smb_ip", p->SmbIp, 32)) return 1;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
if (cfgfile_yesno (option, value, "logfile", &p->logfile))
|
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;
|
p->use_wheel_input = 0;
|
||||||
#ifdef GEKKO
|
#ifdef GEKKO
|
||||||
|
p->smb_enable = 0;
|
||||||
strcpy (p->SmbUser,"User");
|
strcpy (p->SmbUser,"User");
|
||||||
strcpy (p->SmbPwd, "Password");
|
strcpy (p->SmbPwd, "Password");
|
||||||
strcpy (p->SmbShare, "Share");
|
strcpy (p->SmbShare, "Share");
|
||||||
|
@ -119,10 +119,12 @@ int msgInfo(char *text, int duration, SDL_Rect *irc)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int msgKill(SDL_Rect *rc)
|
/*
|
||||||
|
void msgKill(SDL_Rect *rc)
|
||||||
{
|
{
|
||||||
SDL_UpdateRect(real_screen, rc->x, rc->y, rc->w,rc->h);
|
SDL_UpdateRect(real_screen, rc->x, rc->y, rc->w,rc->h);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
int msgYesNo(char *text, int default_opt, int x, int y)
|
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 rc;
|
||||||
SDL_Rect brc;
|
SDL_Rect brc;
|
||||||
uint32_t key;
|
uint32_t key;
|
||||||
int old;
|
//int old;
|
||||||
|
|
||||||
old = default_opt;
|
//old = default_opt;
|
||||||
|
|
||||||
if (x < 0)
|
if (x < 0)
|
||||||
X = (FULL_DISPLAY_X /2) - (len / 2 + 1)*12;
|
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);
|
select_next(p_menu, 0, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
static int is_submenu_title(menu_t *p_menu, int n)
|
static int is_submenu_title(menu_t *p_menu, int n)
|
||||||
{
|
{
|
||||||
if (n+1 >= p_menu->n_entries)
|
if (n+1 >= p_menu->n_entries)
|
||||||
@ -592,7 +595,7 @@ static int is_submenu_title(menu_t *p_menu, int n)
|
|||||||
else
|
else
|
||||||
return IS_SUBMENU(p_menu->pp_msgs[n+1]);
|
return IS_SUBMENU(p_menu->pp_msgs[n+1]);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
static void menu_init_internal(menu_t *p_menu, const char *title,
|
static void menu_init_internal(menu_t *p_menu, const char *title,
|
||||||
TTF_Font *p_font, const char **pp_msgs,
|
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,
|
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);
|
const char **file_list = get_file_list(dir_path);
|
||||||
char *sel;
|
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);
|
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 msgInfo(char *text, int duration, SDL_Rect *rc);
|
||||||
|
|
||||||
extern int msgYesNo(char *text, int def,int x, int y);
|
extern int msgYesNo(char *text, int def,int x, int y);
|
||||||
|
@ -247,6 +247,7 @@ struct uae_prefs {
|
|||||||
int use_wheel_input;
|
int use_wheel_input;
|
||||||
int logfile;
|
int logfile;
|
||||||
#ifdef GEKKO
|
#ifdef GEKKO
|
||||||
|
int smb_enable;
|
||||||
char SmbUser[32];
|
char SmbUser[32];
|
||||||
char SmbPwd[32];
|
char SmbPwd[32];
|
||||||
char SmbShare[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
|
if ((currprefs.gfxmem_size & (currprefs.gfxmem_size - 1)) != 0
|
||||||
|| (currprefs.gfxmem_size != 0 && (currprefs.gfxmem_size < 0x100000 || currprefs.gfxmem_size > 0x2000000)))
|
|| (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;
|
currprefs.gfxmem_size = 0;
|
||||||
err = 1;
|
err = 1;
|
||||||
}
|
}
|
||||||
@ -497,11 +497,11 @@ static void parse_cmdline (int argc, char **argv)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
/*
|
||||||
static void parse_user_conf_file(const char *extension)
|
static void parse_user_conf_file(const char *extension)
|
||||||
{
|
{
|
||||||
/* FIXME! ska: This is temporary, and will be removed when you can
|
// FIXME! ska: This is temporary, and will be removed when you can
|
||||||
* pass command line options in meta.xml for the homebrew channel */
|
// pass command line options in meta.xml for the homebrew channel
|
||||||
char user_options[255] = "";
|
char user_options[255] = "";
|
||||||
char *user_argv[] = {"program", "-f", user_options};
|
char *user_argv[] = {"program", "-f", user_options};
|
||||||
#ifdef OPTIONS_IN_HOME
|
#ifdef OPTIONS_IN_HOME
|
||||||
@ -515,11 +515,11 @@ static void parse_user_conf_file(const char *extension)
|
|||||||
strcat(user_options, OPTIONSFILENAME);
|
strcat(user_options, OPTIONSFILENAME);
|
||||||
strcat(user_options, extension);
|
strcat(user_options, extension);
|
||||||
|
|
||||||
/* Allow the user uaerc to override the default one */
|
// Allow the user uaerc to override the default one
|
||||||
parse_cmdline (3, user_argv);
|
//parse_cmdline (3, user_argv);
|
||||||
/* Until here */
|
// Until here
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
static void parse_cmdline_and_init_file (int argc, char **argv)
|
static void parse_cmdline_and_init_file (int argc, char **argv)
|
||||||
{
|
{
|
||||||
char *home;
|
char *home;
|
||||||
@ -1106,7 +1106,7 @@ int main (int argc, char **argv)
|
|||||||
cfgfile_load (&currprefs, SMBFILENAME, 0);
|
cfgfile_load (&currprefs, SMBFILENAME, 0);
|
||||||
printf("\n");
|
printf("\n");
|
||||||
|
|
||||||
if (networkisinit) ConnectShare();
|
if (networkisinit && currprefs.smb_enable) ConnectShare();
|
||||||
|
|
||||||
sleep(3);
|
sleep(3);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user