Esempio n. 1
0
void wiimenu_menu()
{
	int go = 1;
	int selected = 0;
	int oldselected = 0;
	int refresh = 1;
	int reload = 1;
	/* The In-emulation menus */
	log_console_enable_video(1);
	
	while(go) {
		if(time_to_leave)
			break;
		VIDEO_WaitVSync();
		WPAD_ScanPads();
		u32 WPAD_Pressed = WPAD_ButtonsDown(0);
		WPAD_Pressed	|= WPAD_ButtonsDown(1);
		WPAD_Pressed	|= WPAD_ButtonsDown(2);
		WPAD_Pressed	|= WPAD_ButtonsDown(3);

		if(WPAD_Pressed & WPAD_BUTTON_DOWN) {
			selected++;
			if(started)
				selected %= 7;
			else
				selected %= 5;
			refresh = 1;
		}

		if(WPAD_Pressed & WPAD_BUTTON_UP) {
			selected--;
			if(selected < 0) {
				if(started)
					selected = 6;
				else
					selected = 4;
			}
			refresh = 1;
		}

		if((WPAD_Pressed & WPAD_BUTTON_A) || (WPAD_Pressed & WPAD_BUTTON_PLUS)) {
			if(wiimenu_do_selection(selected) == -1)
				break;
			refresh = 1;
			reload = 1;
		}

		if((WPAD_Pressed & WPAD_BUTTON_B) || (WPAD_Pressed & WPAD_BUTTON_HOME)) {
			if(started) {
				break;
			}
		}
		
		if(reload) {
			PrintMenuHead();
			
			if(started) {
				printf("   Return to Emulator                               \n");
				printf("   Reset Emulator                                   \n");
			}
			printf("   Controller Config                                 <DISABLED>\n");
			printf("   Switch Disks                                               >\n");
			printf("   Emulation Options   ");
			if(!started) {
				printf("                                       >\n");
			}else{
				printf("(May require emulator reset)           >\n");
			}
			printf("   Return to Loader                                            \n");
			printf("   Return to Wii Menu                                          \n");			
			BorderOverlay();
		}
		
		if(refresh) {
			printf("\x1B[%d;0H   ", oldselected + 3);
			printf("\x1B[%d;0H  \x1A", selected + 3);
			oldselected = selected;
			BorderOverlay();
		}
	}
	log_console_enable_video(0);
}
Esempio n. 2
0
void wiimenu_initialize()
{
	log_console_init(vmode, 1, (640 - (8 * CONWIDTH)) / 2, (480 -	(16 * CONHEIGHT)) / 2, \
				8 * CONWIDTH,	16 * CONHEIGHT);
	log_console_enable_video(1);
}
Esempio n. 3
0
void log_console_change_state_video()
{
	log_console_enable_video(!video_active);
}