void OSystem_Wii::initGfx() { gfx_set_underscan(ConfMan.getInt("wii_video_default_underscan_x"), ConfMan.getInt("wii_video_default_underscan_y")); _overlayWidth = gfx_video_get_width(); _overlayHeight = gfx_video_get_height(); #ifndef GAMECUBE if (CONF_GetAspectRatio() && _fullscreen) _overlayHeight = 400; #endif _overlaySize = _overlayWidth * _overlayHeight * 2; _overlayPixels = (OverlayColor *) memalign(32, _overlaySize); memset(&_texMouse, 0, sizeof(gfx_tex_t)); memset(&_texOverlay, 0, sizeof(gfx_tex_t)); memset(&_texGame, 0, sizeof(gfx_tex_t)); _cursorPalette = (u16 *) malloc(256 * 2); if (!_cursorPalette) { printf("could not alloc palette buffer\n"); ::abort(); } memset(_cursorPalette, 0, 256 * 2); if (!gfx_tex_init(&_texOverlay, GFX_TF_RGB5A3, 0, _overlayWidth, _overlayHeight)) { printf("could not init the overlay texture\n"); ::abort(); } gfx_coords(&_coordsOverlay, &_texOverlay, GFX_COORD_FULLSCREEN); }
void OSystem_Wii::switchVideoMode(int mode) { static const struct { gfx_video_mode_t mode; bool filter; } map[] = { { GFX_MODE_DEFAULT, false }, { GFX_MODE_DEFAULT, true }, { GFX_MODE_DS, false }, { GFX_MODE_DS, true } }; if (_gameHeight > 240) { if (mode == gmDoubleStrike) mode = gmStandard; else if (mode == gmDoubleStrikeFiltered) mode = gmStandardFiltered; } printf("switchVideoMode %d\n", mode); if (map[_actualGraphicsMode].mode != map[mode].mode) { GXRModeObj obj; gfx_video_deinit(); gfx_video_get_modeobj(&obj, GFX_STANDARD_AUTO, map[mode].mode); gfx_video_init(&obj); gfx_init(); gfx_con_init(NULL); } _actualGraphicsMode = mode; _bilinearFilter = map[mode].filter; gfx_tex_set_bilinear_filter(&_texGame, _bilinearFilter); gfx_tex_set_bilinear_filter(&_texMouse, _bilinearFilter); u16 usx, usy; if (map[mode].mode == GFX_MODE_DS) { usx = ConfMan.getInt("wii_video_ds_underscan_x", Common::ConfigManager::kApplicationDomain); usy = ConfMan.getInt("wii_video_ds_underscan_y", Common::ConfigManager::kApplicationDomain); } else { usx = ConfMan.getInt("wii_video_default_underscan_x", Common::ConfigManager::kApplicationDomain); usy = ConfMan.getInt("wii_video_default_underscan_y", Common::ConfigManager::kApplicationDomain); } gfx_set_underscan(usx, usy); gfx_coords(&_coordsOverlay, &_texOverlay, GFX_COORD_FULLSCREEN); gfx_coords(&_coordsGame, &_texGame, GFX_COORD_FULLSCREEN); updateScreenResolution(); }
void WiiOptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) { WiiFilesystemFactory &fsf = WiiFilesystemFactory::instance(); switch (cmd) { case 'x': case 'y': gfx_set_underscan(_sliderUnderscanX->getValue(), _sliderUnderscanY->getValue()); break; case 'k': save(); close(); break; case 'c': revert(); close(); break; #ifdef USE_WII_DI case 'mdvd': fsf.mount(WiiFilesystemFactory::kDVD); break; case 'udvd': fsf.umount(WiiFilesystemFactory::kDVD); break; #endif #ifdef USE_WII_SMB case 'net': fsf.asyncInitNetwork(); break; case 'msmb': fsf.setSMBLoginData(_editSMBServer->getEditString(), _editSMBShare->getEditString(), _editSMBUsername->getEditString(), _editSMBPassword->getEditString()); fsf.mount(WiiFilesystemFactory::kSMB); break; case 'usmb': fsf.umount(WiiFilesystemFactory::kSMB); break; #endif default: Dialog::handleCommand(sender, cmd, data); break; } }
void WiiOptionsDialog::revert() { gfx_set_underscan(ConfMan.getInt(_strUnderscanX, Common::ConfigManager::kApplicationDomain), ConfMan.getInt(_strUnderscanY, Common::ConfigManager::kApplicationDomain)); }