2005-03-03 20:02:39 +00:00
|
|
|
/*********************************************************************/
|
|
|
|
/* menu.c - user menu for rockboy */
|
|
|
|
/* */
|
|
|
|
/* Note: this file only exposes one function: do_user_menu(). */
|
|
|
|
/*********************************************************************/
|
|
|
|
|
|
|
|
#include "button.h"
|
|
|
|
#include "rockmacros.h"
|
2005-03-04 09:30:27 +00:00
|
|
|
#include "mem.h"
|
2007-05-08 11:55:43 +00:00
|
|
|
#include "lib/oldmenuapi.h"
|
2007-07-30 05:19:05 +00:00
|
|
|
#include "rtc-gb.h"
|
2005-03-03 20:02:39 +00:00
|
|
|
|
2006-01-20 20:59:07 +00:00
|
|
|
#if (CONFIG_KEYPAD == IPOD_4G_PAD)
|
|
|
|
#define MENU_BUTTON_UP BUTTON_SCROLL_BACK
|
|
|
|
#define MENU_BUTTON_DOWN BUTTON_SCROLL_FWD
|
|
|
|
#define MENU_BUTTON_LEFT BUTTON_LEFT
|
|
|
|
#define MENU_BUTTON_RIGHT BUTTON_RIGHT
|
2007-02-06 21:41:08 +00:00
|
|
|
|
|
|
|
#elif (CONFIG_KEYPAD == IRIVER_H10_PAD)
|
|
|
|
#define MENU_BUTTON_UP BUTTON_SCROLL_UP
|
|
|
|
#define MENU_BUTTON_DOWN BUTTON_SCROLL_DOWN
|
|
|
|
#define MENU_BUTTON_LEFT BUTTON_LEFT
|
|
|
|
#define MENU_BUTTON_RIGHT BUTTON_RIGHT
|
|
|
|
|
2006-01-20 20:59:07 +00:00
|
|
|
#else
|
|
|
|
#define MENU_BUTTON_UP BUTTON_UP
|
|
|
|
#define MENU_BUTTON_DOWN BUTTON_DOWN
|
|
|
|
#define MENU_BUTTON_LEFT BUTTON_LEFT
|
|
|
|
#define MENU_BUTTON_RIGHT BUTTON_RIGHT
|
|
|
|
#endif
|
|
|
|
|
2005-03-03 20:02:39 +00:00
|
|
|
/* load/save state function declarations */
|
2005-03-04 09:30:27 +00:00
|
|
|
static void do_opt_menu(void);
|
2006-06-19 01:47:45 +00:00
|
|
|
static void do_slot_menu(bool is_load);
|
2005-03-04 09:30:27 +00:00
|
|
|
static void munge_name(char *buf, size_t bufsiz);
|
|
|
|
|
|
|
|
/* directory ROM save slots belong in */
|
|
|
|
#define STATE_DIR "/.rockbox/rockboy"
|
2005-03-03 20:02:39 +00:00
|
|
|
|
2006-01-20 13:05:52 +00:00
|
|
|
int getbutton(char *text)
|
|
|
|
{
|
2007-06-24 16:00:55 +00:00
|
|
|
int fw, fh;
|
|
|
|
rb->lcd_clear_display();
|
|
|
|
rb->font_getstringsize(text, &fw, &fh,0);
|
|
|
|
rb->lcd_putsxy(LCD_WIDTH/2-fw/2, LCD_HEIGHT/2-fh/2, text);
|
2006-06-19 01:47:45 +00:00
|
|
|
rb->lcd_update();
|
|
|
|
rb->sleep(30);
|
|
|
|
|
2007-06-24 16:00:55 +00:00
|
|
|
while (rb->button_get(false) != BUTTON_NONE)
|
2006-06-19 01:47:45 +00:00
|
|
|
rb->yield();
|
|
|
|
|
|
|
|
int button;
|
|
|
|
while(true)
|
|
|
|
{
|
|
|
|
button = rb->button_get(true);
|
|
|
|
button=button&0x00000FFF;
|
|
|
|
|
2007-06-24 16:00:55 +00:00
|
|
|
return button;
|
2006-06-19 01:47:45 +00:00
|
|
|
}
|
2006-01-20 13:05:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void setupkeys(void)
|
|
|
|
{
|
2007-06-24 16:00:55 +00:00
|
|
|
options.UP=getbutton ("Press Up");
|
|
|
|
options.DOWN=getbutton ("Press Down");
|
|
|
|
options.LEFT=getbutton ("Press Left");
|
|
|
|
options.RIGHT=getbutton ("Press Right");
|
2006-01-20 13:05:52 +00:00
|
|
|
|
2007-06-24 16:00:55 +00:00
|
|
|
options.A=getbutton ("Press A");
|
|
|
|
options.B=getbutton ("Press B");
|
2006-01-20 13:05:52 +00:00
|
|
|
|
2007-06-24 16:00:55 +00:00
|
|
|
options.START=getbutton ("Press Start");
|
2006-06-19 01:47:45 +00:00
|
|
|
options.SELECT=getbutton("Press Select");
|
2006-01-20 13:05:52 +00:00
|
|
|
|
2007-06-24 16:00:55 +00:00
|
|
|
options.MENU=getbutton ("Press Menu");
|
2006-01-20 13:05:52 +00:00
|
|
|
}
|
|
|
|
|
2005-03-03 20:02:39 +00:00
|
|
|
/*
|
|
|
|
* do_user_menu - create the user menu on the screen.
|
|
|
|
*
|
|
|
|
* Returns USER_MENU_QUIT if the user selected "quit", otherwise
|
|
|
|
* returns zero.
|
|
|
|
*/
|
|
|
|
int do_user_menu(void) {
|
2006-06-19 01:47:45 +00:00
|
|
|
bool done=false;
|
|
|
|
int m, ret=0;
|
|
|
|
int result;
|
2007-07-30 05:19:05 +00:00
|
|
|
int time = 0;
|
|
|
|
|
|
|
|
#if CONFIG_RTC
|
|
|
|
time = rb->mktime(rb->get_time());
|
|
|
|
#endif
|
2006-06-19 01:47:45 +00:00
|
|
|
|
|
|
|
/* Clean out the button Queue */
|
|
|
|
while (rb->button_get(false) != BUTTON_NONE)
|
|
|
|
rb->yield();
|
|
|
|
|
|
|
|
static const struct menu_item items[] = {
|
|
|
|
{"Load Game", NULL },
|
|
|
|
{"Save Game", NULL },
|
|
|
|
{"Options", NULL },
|
|
|
|
{"Quit", NULL },
|
|
|
|
};
|
|
|
|
|
|
|
|
pcm_init();
|
|
|
|
|
2007-05-08 11:55:43 +00:00
|
|
|
m = menu_init(rb,items, sizeof(items) / sizeof(*items), NULL, NULL, NULL, NULL);
|
2006-06-19 01:47:45 +00:00
|
|
|
|
|
|
|
while(!done)
|
|
|
|
{
|
2007-05-08 11:55:43 +00:00
|
|
|
result=menu_show(m);
|
2006-06-19 01:47:45 +00:00
|
|
|
|
|
|
|
switch (result)
|
|
|
|
{
|
|
|
|
case 0: /* Load Game */
|
|
|
|
do_slot_menu(true);
|
|
|
|
break;
|
|
|
|
case 1: /* Save Game */
|
|
|
|
do_slot_menu(false);
|
|
|
|
break;
|
|
|
|
case 2: /* Options */
|
|
|
|
do_opt_menu();
|
|
|
|
break;
|
|
|
|
case 3: /* Quit */
|
|
|
|
ret = USER_MENU_QUIT;
|
|
|
|
done=true;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
done=true;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
2005-03-03 20:02:39 +00:00
|
|
|
|
2007-05-08 11:55:43 +00:00
|
|
|
menu_exit(m);
|
2006-01-10 21:55:56 +00:00
|
|
|
|
2006-06-19 01:47:45 +00:00
|
|
|
rb->lcd_setfont(0); /* Reset the font */
|
|
|
|
rb->lcd_clear_display(); /* Clear display for screen size changes */
|
2007-07-30 05:19:05 +00:00
|
|
|
|
|
|
|
/* Keep the RTC in sync */
|
|
|
|
#if CONFIG_RTC
|
|
|
|
time = (rb->mktime(rb->get_time()) - time) * 60;
|
|
|
|
#endif
|
|
|
|
while (time-- > 0) rtc_tick();
|
2006-06-19 01:47:45 +00:00
|
|
|
|
|
|
|
return ret;
|
2005-03-03 20:02:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
2005-03-04 09:30:27 +00:00
|
|
|
* munge_name - munge a string into a filesystem-safe name
|
|
|
|
*/
|
|
|
|
static void munge_name(char *buf, const size_t bufsiz) {
|
2006-06-19 01:47:45 +00:00
|
|
|
unsigned int i, max;
|
2005-03-04 09:30:27 +00:00
|
|
|
|
2006-06-19 01:47:45 +00:00
|
|
|
/* check strlen */
|
|
|
|
max = strlen(buf);
|
|
|
|
max = (max < bufsiz) ? max : bufsiz;
|
2005-03-04 09:30:27 +00:00
|
|
|
|
2006-06-19 01:47:45 +00:00
|
|
|
/* iterate over characters and munge them (if necessary) */
|
|
|
|
for (i = 0; i < max; i++)
|
|
|
|
if (!isalnum(buf[i]))
|
|
|
|
buf[i] = '_';
|
2005-03-04 09:30:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* build_slot_path - build a path to an slot state file for this rom
|
|
|
|
*
|
|
|
|
* Note: uses rom.name. Is there a safer way of doing this? Like a ROM
|
|
|
|
* checksum or something like that?
|
|
|
|
*/
|
|
|
|
static void build_slot_path(char *buf, size_t bufsiz, size_t slot_id) {
|
2006-06-19 01:47:45 +00:00
|
|
|
char name_buf[40];
|
2005-03-04 09:30:27 +00:00
|
|
|
|
2006-06-19 01:47:45 +00:00
|
|
|
/* munge state file name */
|
|
|
|
strncpy(name_buf, rom.name, 40);
|
|
|
|
name_buf[16] = '\0';
|
|
|
|
munge_name(name_buf, strlen(name_buf));
|
2005-03-04 09:30:27 +00:00
|
|
|
|
2006-06-19 01:47:45 +00:00
|
|
|
/* glom the whole mess together */
|
2007-03-17 09:02:53 +00:00
|
|
|
snprintf(buf, bufsiz, "%s/%s-%ld.rbs", STATE_DIR, name_buf, slot_id + 1);
|
2005-03-04 09:30:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* do_file - load or save game data in the given file
|
|
|
|
*
|
|
|
|
* Returns true on success and false on failure.
|
2005-03-03 20:02:39 +00:00
|
|
|
*
|
2005-03-04 09:30:27 +00:00
|
|
|
* @desc is a brief user-provided description (<20 bytes) of the state.
|
|
|
|
* If no description is provided, set @desc to NULL.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
static bool do_file(char *path, char *desc, bool is_load) {
|
2006-06-19 01:47:45 +00:00
|
|
|
char buf[200], desc_buf[20];
|
|
|
|
int fd, file_mode;
|
2005-03-04 09:30:27 +00:00
|
|
|
|
2006-06-19 01:47:45 +00:00
|
|
|
/* set file mode */
|
|
|
|
file_mode = is_load ? O_RDONLY : (O_WRONLY | O_CREAT);
|
2005-03-04 09:30:27 +00:00
|
|
|
|
2006-06-19 01:47:45 +00:00
|
|
|
/* attempt to open file descriptor here */
|
|
|
|
if ((fd = open(path, file_mode)) <= 0)
|
|
|
|
return false;
|
|
|
|
|
|
|
|
/* load/save state */
|
|
|
|
if (is_load)
|
|
|
|
{
|
|
|
|
/* load description */
|
|
|
|
read(fd, desc_buf, 20);
|
|
|
|
|
|
|
|
/* load state */
|
|
|
|
loadstate(fd);
|
|
|
|
|
|
|
|
/* print out a status message so the user knows the state loaded */
|
|
|
|
snprintf(buf, 200, "Loaded state from \"%s\"", path);
|
2007-03-16 21:56:08 +00:00
|
|
|
rb->splash(HZ * 1, buf);
|
2006-06-19 01:47:45 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
/* build description buffer */
|
|
|
|
memset(desc_buf, 0, 20);
|
|
|
|
if (desc)
|
|
|
|
strncpy(desc_buf, desc, 20);
|
|
|
|
|
|
|
|
/* save state */
|
|
|
|
write(fd, desc_buf, 20);
|
|
|
|
savestate(fd);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* close file descriptor */
|
|
|
|
close(fd);
|
|
|
|
|
|
|
|
/* return true (for success) */
|
|
|
|
return true;
|
2005-03-04 09:30:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* do_slot - load or save game data in the given slot
|
2005-03-03 20:02:39 +00:00
|
|
|
*
|
2005-03-04 09:30:27 +00:00
|
|
|
* Returns true on success and false on failure.
|
|
|
|
*/
|
|
|
|
static bool do_slot(size_t slot_id, bool is_load) {
|
2006-06-19 01:47:45 +00:00
|
|
|
char path_buf[256], desc_buf[20];
|
2005-03-04 09:30:27 +00:00
|
|
|
|
2006-06-19 01:47:45 +00:00
|
|
|
/* build slot filename, clear desc buf */
|
|
|
|
build_slot_path(path_buf, 256, slot_id);
|
|
|
|
memset(desc_buf, 0, 20);
|
|
|
|
|
|
|
|
/* if we're saving to a slot, then get a brief description */
|
|
|
|
if (!is_load)
|
|
|
|
if (rb->kbd_input(desc_buf, 20) || !strlen(desc_buf))
|
|
|
|
{
|
|
|
|
memset(desc_buf, 0, 20);
|
|
|
|
strncpy(desc_buf, "Untitled", 20);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* load/save file */
|
|
|
|
return do_file(path_buf, desc_buf, is_load);
|
2005-03-04 09:30:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* get information on the given slot
|
|
|
|
*/
|
|
|
|
static void slot_info(char *info_buf, size_t info_bufsiz, size_t slot_id) {
|
2006-06-19 01:47:45 +00:00
|
|
|
char buf[256];
|
|
|
|
int fd;
|
|
|
|
|
|
|
|
/* get slot file path */
|
|
|
|
build_slot_path(buf, 256, slot_id);
|
|
|
|
|
|
|
|
/* attempt to open slot */
|
|
|
|
if ((fd = open(buf, O_RDONLY)) >= 0)
|
|
|
|
{
|
|
|
|
/* this slot has a some data in it, read it */
|
|
|
|
if (read(fd, buf, 20) > 0)
|
|
|
|
{
|
|
|
|
buf[20] = '\0';
|
2007-03-17 09:02:53 +00:00
|
|
|
snprintf(info_buf, info_bufsiz, "%ld. %s", slot_id + 1, buf);
|
2006-06-19 01:47:45 +00:00
|
|
|
}
|
|
|
|
else
|
2007-03-17 09:02:53 +00:00
|
|
|
snprintf(info_buf, info_bufsiz, "%ld. ERROR", slot_id + 1);
|
2006-06-19 01:47:45 +00:00
|
|
|
|
|
|
|
close(fd);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
/* if we couldn't open the file, then the slot is empty */
|
2007-03-17 09:02:53 +00:00
|
|
|
snprintf(info_buf, info_bufsiz, "%ld. %s", slot_id + 1, "<Empty>");
|
2005-03-04 09:30:27 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* do_slot_menu - prompt the user for a load/save memory slot
|
2005-03-03 20:02:39 +00:00
|
|
|
*/
|
|
|
|
static void do_slot_menu(bool is_load) {
|
2006-06-19 01:47:45 +00:00
|
|
|
bool done=false;
|
2005-03-03 20:02:39 +00:00
|
|
|
|
2006-06-19 01:47:45 +00:00
|
|
|
char buf[5][20];
|
2006-01-10 21:55:56 +00:00
|
|
|
|
2006-06-19 01:47:45 +00:00
|
|
|
int m;
|
|
|
|
int result;
|
|
|
|
int i;
|
2006-01-10 21:55:56 +00:00
|
|
|
|
2006-06-19 01:47:45 +00:00
|
|
|
struct menu_item items[] = {
|
|
|
|
{ buf[0] , NULL },
|
|
|
|
{ buf[1] , NULL },
|
|
|
|
{ buf[2] , NULL },
|
|
|
|
{ buf[3] , NULL },
|
|
|
|
{ buf[4] , NULL },
|
|
|
|
};
|
2005-03-04 09:30:27 +00:00
|
|
|
|
2006-06-19 01:47:45 +00:00
|
|
|
int num_items = sizeof(items) / sizeof(*items);
|
2005-03-04 09:30:27 +00:00
|
|
|
|
2006-06-19 01:47:45 +00:00
|
|
|
/* create menu items */
|
|
|
|
for (i = 0; i < num_items; i++)
|
|
|
|
slot_info(buf[i], 20, i);
|
2005-03-03 20:02:39 +00:00
|
|
|
|
2007-05-08 11:55:43 +00:00
|
|
|
m = menu_init(rb,items, num_items, NULL, NULL, NULL, NULL);
|
2005-03-03 20:02:39 +00:00
|
|
|
|
2006-06-19 01:47:45 +00:00
|
|
|
while(!done)
|
|
|
|
{
|
2007-05-08 11:55:43 +00:00
|
|
|
result=menu_show(m);
|
2006-06-19 01:47:45 +00:00
|
|
|
|
|
|
|
if (result<num_items && result >= 0 )
|
|
|
|
done = do_slot(result, is_load);
|
|
|
|
else
|
|
|
|
done = true;
|
|
|
|
}
|
2007-05-08 11:55:43 +00:00
|
|
|
menu_exit(m);
|
2005-03-03 20:02:39 +00:00
|
|
|
}
|
|
|
|
|
2006-06-19 01:47:45 +00:00
|
|
|
static void do_opt_menu(void)
|
|
|
|
{
|
|
|
|
bool done=false;
|
|
|
|
int m;
|
|
|
|
int result;
|
|
|
|
|
|
|
|
static const struct opt_items onoff[2] = {
|
2006-08-11 12:48:36 +00:00
|
|
|
{ "Off", -1 },
|
|
|
|
{ "On" , -1 },
|
2006-06-19 01:47:45 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
static const struct opt_items frameskip[]= {
|
2007-06-24 16:00:55 +00:00
|
|
|
{ "0 Max", -1 },
|
|
|
|
{ "1 Max", -1 },
|
|
|
|
{ "2 Max", -1 },
|
2006-08-11 12:48:36 +00:00
|
|
|
{ "3 Max", -1 },
|
|
|
|
{ "4 Max", -1 },
|
|
|
|
{ "5 Max", -1 },
|
|
|
|
{ "6 Max", -1 },
|
2006-06-19 01:47:45 +00:00
|
|
|
};
|
2007-02-06 21:41:08 +00:00
|
|
|
|
2007-06-25 04:26:23 +00:00
|
|
|
#ifdef HAVE_LCD_COLOR
|
|
|
|
static const struct opt_items fullscreen[]= {
|
|
|
|
{ "Scaled", -1 },
|
|
|
|
{ "Scaled - Maintain Ratio", -1 },
|
|
|
|
#if (LCD_WIDTH>=160) && (LCD_HEIGHT>=144)
|
|
|
|
{ "Unscaled", -1 },
|
|
|
|
#endif
|
|
|
|
};
|
|
|
|
|
2007-02-06 21:41:08 +00:00
|
|
|
static const struct opt_items palette[]= {
|
|
|
|
{ "Brown (Default)", -1 },
|
|
|
|
{ "Gray", -1 },
|
|
|
|
{ "Light Gray", -1 },
|
|
|
|
{ "Multi-Color 1", -1 },
|
|
|
|
{ "Multi-Color 2", -1 },
|
|
|
|
{ "Adventure Island", -1 },
|
|
|
|
{ "Adventure Island 2", -1 },
|
|
|
|
{ "Balloon Kid", -1 },
|
|
|
|
{ "Batman", -1 },
|
|
|
|
{ "Batman: Return of Joker", -1 },
|
|
|
|
{ "Bionic Commando", -1 },
|
|
|
|
{ "Castlvania Adventure", -1 },
|
|
|
|
{ "Donkey Kong Land", -1 },
|
|
|
|
{ "Dr. Mario", -1 },
|
|
|
|
{ "Kirby", -1 },
|
|
|
|
{ "Metroid", -1 },
|
|
|
|
{ "Zelda", -1 },
|
|
|
|
};
|
|
|
|
#endif
|
2006-06-19 01:47:45 +00:00
|
|
|
|
|
|
|
static const struct menu_item items[] = {
|
2006-08-11 12:48:36 +00:00
|
|
|
{ "Max Frameskip", NULL },
|
|
|
|
{ "Sound" , NULL },
|
|
|
|
{ "Stats" , NULL },
|
|
|
|
{ "Set Keys (Buggy)", NULL },
|
2007-02-06 21:41:08 +00:00
|
|
|
#ifdef HAVE_LCD_COLOR
|
2007-06-25 04:26:23 +00:00
|
|
|
{ "Screen Size" , NULL },
|
|
|
|
{ "Screen Rotate" , NULL },
|
2007-02-06 21:41:08 +00:00
|
|
|
{ "Set Palette" , NULL },
|
|
|
|
#endif
|
2006-06-19 01:47:45 +00:00
|
|
|
};
|
|
|
|
|
2007-05-08 11:55:43 +00:00
|
|
|
m = menu_init(rb,items, sizeof(items) / sizeof(*items), NULL, NULL, NULL, NULL);
|
2006-06-19 01:47:45 +00:00
|
|
|
|
2007-06-25 04:26:23 +00:00
|
|
|
options.dirty=1; /* Assume that the settings have been changed */
|
2007-06-24 16:00:55 +00:00
|
|
|
|
2006-06-19 01:47:45 +00:00
|
|
|
while(!done)
|
|
|
|
{
|
|
|
|
|
2007-05-08 11:55:43 +00:00
|
|
|
result=menu_show(m);
|
2005-03-03 20:02:39 +00:00
|
|
|
|
2006-06-19 01:47:45 +00:00
|
|
|
switch (result)
|
|
|
|
{
|
|
|
|
case 0: /* Frameskip */
|
2007-06-24 16:00:55 +00:00
|
|
|
rb->set_option(items[0].desc, &options.maxskip, INT, frameskip,
|
|
|
|
sizeof(frameskip)/sizeof(*frameskip), NULL );
|
2006-06-19 01:47:45 +00:00
|
|
|
break;
|
|
|
|
case 1: /* Sound */
|
|
|
|
if(options.sound>1) options.sound=1;
|
|
|
|
rb->set_option(items[1].desc, &options.sound, INT, onoff, 2, NULL );
|
2007-02-06 21:41:08 +00:00
|
|
|
if(options.sound) sound_dirty();
|
2006-06-19 01:47:45 +00:00
|
|
|
break;
|
|
|
|
case 2: /* Stats */
|
|
|
|
rb->set_option(items[2].desc, &options.showstats, INT, onoff, 2, NULL );
|
|
|
|
break;
|
2007-06-25 04:26:23 +00:00
|
|
|
case 3: /* Keys */
|
|
|
|
setupkeys();
|
|
|
|
break;
|
|
|
|
#ifdef HAVE_LCD_COLOR
|
|
|
|
case 4: /* Screen Size */
|
|
|
|
rb->set_option(items[4].desc, &options.fullscreen, INT, fullscreen,
|
2007-06-24 16:00:55 +00:00
|
|
|
sizeof(fullscreen)/sizeof(*fullscreen), NULL );
|
|
|
|
setvidmode();
|
|
|
|
break;
|
2007-06-25 04:26:23 +00:00
|
|
|
case 5: /* Screen rotate */
|
|
|
|
rb->set_option(items[5].desc, &options.rotate, INT, onoff, 2, NULL );
|
2007-06-24 16:00:55 +00:00
|
|
|
setvidmode();
|
2006-06-19 01:47:45 +00:00
|
|
|
break;
|
2007-06-24 16:00:55 +00:00
|
|
|
case 6: /* Palette */
|
|
|
|
rb->set_option(items[6].desc, &options.pal, INT, palette, 17, NULL );
|
2007-02-06 21:41:08 +00:00
|
|
|
set_pal();
|
|
|
|
break;
|
|
|
|
#endif
|
2006-06-19 01:47:45 +00:00
|
|
|
default:
|
|
|
|
done=true;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
2007-05-08 11:55:43 +00:00
|
|
|
menu_exit(m);
|
2005-03-03 20:02:39 +00:00
|
|
|
}
|