bool CGUIWindowSettingsScreenCalibration::OnAction(const CAction &action) { switch (action.GetID()) { case ACTION_CALIBRATE_SWAP_ARROWS: { NextControl(); return true; } break; case ACTION_CALIBRATE_RESET: { CGUIDialogYesNo* pDialog = CServiceBroker::GetGUI()->GetWindowManager().GetWindow<CGUIDialogYesNo>(WINDOW_DIALOG_YES_NO); pDialog->SetHeading(CVariant{20325}); std::string strText = StringUtils::Format(g_localizeStrings.Get(20326).c_str(), CServiceBroker::GetWinSystem()->GetGfxContext().GetResInfo(m_Res[m_iCurRes]).strMode.c_str()); pDialog->SetLine(0, CVariant{std::move(strText)}); pDialog->SetLine(1, CVariant{20327}); pDialog->SetChoice(0, CVariant{222}); pDialog->SetChoice(1, CVariant{186}); pDialog->Open(); if (pDialog->IsConfirmed()) { CServiceBroker::GetWinSystem()->GetGfxContext().ResetScreenParameters(m_Res[m_iCurRes]); ResetControls(); } return true; } break; case ACTION_CHANGE_RESOLUTION: // choose the next resolution in our list { m_iCurRes = (m_iCurRes+1) % m_Res.size(); CServiceBroker::GetWinSystem()->GetGfxContext().SetVideoResolution(m_Res[m_iCurRes], false); ResetControls(); return true; } break; // ignore all gesture meta actions case ACTION_GESTURE_BEGIN: case ACTION_GESTURE_END: case ACTION_GESTURE_ABORT: case ACTION_GESTURE_NOTIFY: case ACTION_GESTURE_PAN: case ACTION_GESTURE_ROTATE: case ACTION_GESTURE_ZOOM: return true; } // if we see a mouse move event without dx and dy (amount2 and amount3) these // are the focus actions which are generated on touch events and those should // be eaten/ignored here. Else we will switch to the screencalibration controls // which are at that x/y value on each touch/tap/swipe which makes the whole window // unusable for touch screens if (action.GetID() == ACTION_MOUSE_MOVE && action.GetAmount(2) == 0 && action.GetAmount(3) == 0) return true; return CGUIWindow::OnAction(action); // base class to handle basic movement etc. }
bool Input_Engine::RegisterInputController(Input_Controller* arg) { //ResetControls(); input_controller = arg; ResetControls(); return true; }
/******************************************************************** * Funzione : OnUpdate * Descrizione: * Parametri : * Ritorno : * Note : *********************************************************************/ void CWinSigmaView::OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint) { // TODO: Add your specialized code here and/or call the base class CMainFrame* pFrame = (CMainFrame*)GetParentFrame(); CAziendeTreeCtrl* pTree = (CAziendeTreeCtrl*)&pFrame->m_wndTreeAziende; CWinSigmaDoc* pDoc = (CWinSigmaDoc*)GetDocument(); // ricava l'item selezionato HTREEITEM hItem = pTree->GetSelectedItem(); // se e' selezionato un item if (hItem != NULL) { // ricava il codice associato all'item long code = pTree->GetItemData(hItem); // se e' stata selezionata una azienda if (code) { CAziendeSet set(m_pDB); set.m_strFilter.Format("Codice = %ld", code); set.Open(); // aggiorno le variabili membro in base ai valori del recordset m_csCodiceCliente.Format("%ld", set.m_Codice); m_csABI = set.m_ABI; m_csBanca = set.m_Banca; m_csCAB = set.m_CAB; m_csCAP = set.m_CAP; m_csCitta = set.m_Citta; m_csCodiceFiscale = set.m_CodiceFiscale; m_csCognome = set.m_Cognome; m_csFax = set.m_Fax; m_csIndirizzo = set.m_Indirizzo; m_csNome = set.m_Nome; m_csNote = set.m_Note; m_csPIVA = set.m_P_IVA; //m_csPagamento = set.m_Pagamento; m_csProvincia = set.m_Provincia; m_csRagioneSociale = set.m_RagioneSociale; m_csTelefono = set.m_Telefono; if (set.m_IsImportante == 1) m_IsImportante = 1; else m_IsImportante = 0; set.Close(); // trasferisce i valori prima impostati sulle variabili, ai controlli della vista UpdateData(false); } // altrimenti resetta i controlli della vista else ResetControls(); } }
CWBProcess::~CWBProcess (void) { if (m_pControls) { ResetControls(); delete m_pControls; } }
//////////////////////////////////////////////////////////////////////////////// // Resets the entire skin void MAS::Skin::Reset() { Unload(); ResetColors(); ResetControls(); GenerateDefaultFonts(); GenerateDefaultCursors(); GenerateDefaultSamples(); GenerateDefaultBitmaps(); }
//----------------------------------------------------------------------------- // Purpose: //----------------------------------------------------------------------------- void CFourWheelVehiclePhysics::TurnOff( ) { ResetControls(); if ( m_bIsOn ) { m_pOuterServerVehicle->SoundShutdown(); m_bIsOn = false; } }
void CWBProcess::NewExec() { if (GetInterfacePtr()) { if (GetInterfacePtr()->MenuBarNewExec(false, true)) { ResetControls(); m_bChanged = false; } } }
//------------------------------------------------------------------------------ // CControlPos::CControlPos // // default constructor // // Access: public // // Args: // CWnd* pParent = pointer to parent window // // Return: // none // CControlPos::CControlPos(CWnd* pParent /* = NULL */) { m_pParent = pParent; UpdateParentSize(); m_nOldParentHeight = 0; m_nOldParentWidth = 0; SetNegativeMoves(FALSE); ResetControls(); }
void CBookmarkDialog::OnAdd() { CString CS; m_ComboBox.GetWindowText(CS); if (m_ListBox.FindStringExact(-1,CS)==LB_ERR) { CBookMark * BM=new CBookMark(CS,m_fX,m_fY,m_fZ,m_fRot,m_fTilt,m_fZoom,m_iColorSchemeIndex); pSettings_G->AddBookMark(BM); ResetControls(); m_bChanged=TRUE; } }
void CWBProcess::OnMenuBarNewClick( ) { if ( GetInterfacePtr() ) { if (GetInterfacePtr()->MenuBarNewExec(m_bChanged, true)) { ResetControls(); m_bChanged = false; if (m_pIWBNotify) m_pIWBNotify->OnWhiteBoardMessage(WBN_NEWEXEC, NULL); } } }
/**************************************************************************** * DefaultSettings * * Sets all the defaults! ***************************************************************************/ void DefaultSettings () { memset (&GCSettings, 0, sizeof (GCSettings)); ResetControls(); // controller button mappings GCSettings.currpal = 1; // color palette GCSettings.timing = 2; // 0 - NTSC, 1 - PAL, 2 - Automatic GCSettings.videomode = 0; // automatic video mode detection GCSettings.Controller = CTRL_PAD2; // NES pad, Four Score, Zapper GCSettings.crosshair = 1; // show zapper crosshair GCSettings.spritelimit = 1; // enforce 8 sprite limit GCSettings.gamegenie = 1; GCSettings.render = 2; // Unfiltered GCSettings.hideoverscan = 2; // hide both horizontal and vertical GCSettings.widescreen = 0; // no aspect ratio correction GCSettings.zoomHor = 1.0; // horizontal zoom level GCSettings.zoomVert = 1.0; // vertical zoom level GCSettings.xshift = 0; // horizontal video shift GCSettings.yshift = 0; // vertical video shift GCSettings.WiimoteOrientation = 0; GCSettings.ExitAction = 0; GCSettings.MusicVolume = 40; GCSettings.SFXVolume = 40; GCSettings.Rumble = 1; #ifdef HW_RVL GCSettings.language = CONF_GetLanguage(); if(GCSettings.language == LANG_JAPANESE || GCSettings.language == LANG_SIMP_CHINESE || GCSettings.language == LANG_TRAD_CHINESE || GCSettings.language == LANG_KOREAN) GCSettings.language = LANG_ENGLISH; #else GCSettings.language = LANG_ENGLISH; #endif GCSettings.LoadMethod = DEVICE_AUTO; // Auto, SD, DVD, USB, Network (SMB) GCSettings.SaveMethod = DEVICE_AUTO; // Auto, SD, USB, Network (SMB) sprintf (GCSettings.LoadFolder, "%s/roms", APPFOLDER); // Path to game files sprintf (GCSettings.SaveFolder, "%s/saves", APPFOLDER); // Path to save files sprintf (GCSettings.CheatFolder, "%s/cheats", APPFOLDER); // Path to cheat files GCSettings.AutoLoad = 1; // Auto Load RAM GCSettings.AutoSave = 1; // Auto Save RAM strcpy(GCSettings.netplayPort, DEFAULT_NETPLAY_PORT); }
BOOL CBookmarkDialog::OnInitDialog() { CDialog::OnInitDialog(); ResetControls(); m_ComboBox.SetFocus(); m_AddButton.EnableWindow(FALSE); m_DeleteButton.EnableWindow(FALSE); m_GotoButton.EnableWindow(FALSE); UpdateStaticControls(NULL); return FALSE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE }
void CBookmarkDialog::OnDelete() { int iIndex=m_ListBox.GetCurSel(); if (iIndex!=LB_ERR) { int iBookMarkIndex=m_ListBox.GetItemData(iIndex); CBookMark * BM=pSettings_G->GetBookMark(iBookMarkIndex); ASSERT(BM!=NULL); if (BM!=NULL) { delete BM; pSettings_G->RemoveBookMark(iBookMarkIndex); m_bChanged=TRUE; } ResetControls(); } }
void DefaultSettings () { /************** GameCube/Wii Settings *********************/ ResetControls(); // controller button mappings GCSettings.LoadMethod = METHOD_AUTO; // Auto, SD, DVD, USB, Network (SMB) GCSettings.SaveMethod = METHOD_AUTO; // Auto, SD, Memory Card Slot A, Memory Card Slot B, USB, Network (SMB) sprintf (GCSettings.LoadFolder,"vbagx/roms"); // Path to game files sprintf (GCSettings.SaveFolder,"vbagx/saves"); // Path to save files sprintf (GCSettings.CheatFolder,"vbagx/cheats"); // Path to cheat files GCSettings.AutoLoad = 1; GCSettings.AutoSave = 1; // custom SMB settings strncpy (GCSettings.smbip, "", 15); // IP Address of share server strncpy (GCSettings.smbuser, "", 19); // Your share user strncpy (GCSettings.smbpwd, "", 19); // Your share user password strncpy (GCSettings.smbshare, "", 19); // Share name on server GCSettings.smbip[15] = 0; GCSettings.smbuser[19] = 0; GCSettings.smbpwd[19] = 0; GCSettings.smbshare[19] = 0; GCSettings.WiimoteOrientation = 0; GCSettings.VerifySaves = 0; GCSettings.Zoom = 0; // zooming default off GCSettings.ZoomLevel = 1.0; // zoom level GCSettings.render = 1; // Filtered GCSettings.scaling = 1; // partial stretch GCSettings.WiiControls = true; // Match Wii Game GCSettings.xshift = 0; // video shift GCSettings.yshift = 0; }
/**************************************************************************** * DefaultSettings * * Sets all the defaults! ***************************************************************************/ void DefaultSettings () { #if 0 /************** GameCube/Wii Settings *********************/ ResetControls(); // controller button mappings GCSettings.LoadMethod = METHOD_AUTO; // Auto, SD, DVD, USB, Network (SMB) GCSettings.SaveMethod = METHOD_AUTO; // Auto, SD, Memory Card Slot A, Memory Card Slot B, USB, Network (SMB) sprintf (GCSettings.LoadFolder,"snes9x/roms"); // Path to game files sprintf (GCSettings.SaveFolder,"snes9x/saves"); // Path to save files sprintf (GCSettings.CheatFolder,"snes9x/cheats"); // Path to cheat files GCSettings.AutoLoad = 1; GCSettings.AutoSave = 1; GCSettings.VerifySaves = 0; // custom SMB settings strncpy (GCSettings.smbip, "", 15); // IP Address of share server strncpy (GCSettings.smbuser, "", 19); // Your share user strncpy (GCSettings.smbpwd, "", 19); // Your share user password strncpy (GCSettings.smbshare, "", 19); // Share name on server GCSettings.smbip[15] = 0; GCSettings.smbuser[19] = 0; GCSettings.smbpwd[19] = 0; GCSettings.smbshare[19] = 0; GCSettings.Controller = CTRL_PAD2; GCSettings.videomode = 0; // automatic video mode detection GCSettings.ZoomLevel = 1.0; // zoom level GCSettings.render = 2; // Unfiltered GCSettings.widescreen = 0; // no aspect ratio correction GCSettings.FilterMethod = FILTER_NONE; // no hq2x GCSettings.xshift = 0; // horizontal video shift GCSettings.yshift = 0; // vertical video shift GCSettings.WiimoteOrientation = 0; GCSettings.ExitAction = 0; GCSettings.MusicVolume = 40; GCSettings.SFXVolume = 40; GCSettings.Rumble = 1; #endif /****************** SNES9x Settings ***********************/ // Default ALL to false memset (&Settings, 0, sizeof (Settings)); // General Settings.MouseMaster = false; Settings.SuperScopeMaster = false; Settings.MultiPlayer5Master = false; Settings.JustifierMaster = false; Settings.ShutdownMaster = true; // needs to be on for ActRaiser 2 Settings.ApplyCheats = true; Settings.BlockInvalidVRAMAccess = false; Settings.HDMATimingHack = 100; // Sound defaults. On GC this is 32Khz/16bit/Stereo/InterpolatedSound Settings.APUEnabled = true; Settings.NextAPUEnabled = true; Settings.SoundPlaybackRate = 32000; Settings.Stereo = true; Settings.SixteenBitSound = true; Settings.SoundEnvelopeHeightReading = true; Settings.SoundSync = true; Settings.FixFrequency = false; Settings.DisableSampleCaching = true; Settings.InterpolatedSound = true; Settings.ReverseStereo = true; // Graphics Settings.Transparency = true; Settings.SupportHiRes = true; Settings.SkipFrames = AUTO_FRAMERATE; Settings.TurboSkipFrames = 19; Settings.DisplayFrameRate = false; Settings.AutoDisplayMessages = 0; Settings.InitialInfoStringTimeout = 200; // # frames to display messages for // Frame timings in 50hz and 60hz cpu mode Settings.FrameTimePAL = 20000; Settings.FrameTimeNTSC = 16667; // SDD1 - Star Ocean Returns Settings.SDD1Pack = true; Settings.ForceNTSC = 0; Settings.ForcePAL = 0; Settings.ForceHiROM = 0; Settings.ForceLoROM = 0; Settings.ForceHeader = 0; Settings.ForceNoHeader = 0; Settings.ForceTransparency = 0; Settings.ForceInterleaved = 0; Settings.ForceInterleaved2 = 0; Settings.ForceInterleaveGD24 = 0; Settings.ForceNotInterleaved = 0; Settings.ForceNoSuperFX = 0; Settings.ForceSuperFX = 0; Settings.ForceDSP1 = 0; Settings.ForceNoDSP1 = 0; }
bool CGUIWindowSettingsScreenCalibration::OnMessage(CGUIMessage& message) { switch ( message.GetMessage() ) { case GUI_MSG_WINDOW_DEINIT: { CDisplaySettings::GetInstance().UpdateCalibrations(); CSettings::GetInstance().Save(); g_graphicsContext.SetCalibrating(false); g_windowManager.ShowOverlay(OVERLAY_STATE_SHOWN); // reset our screen resolution to what it was initially g_graphicsContext.SetVideoResolution(CDisplaySettings::GetInstance().GetCurrentResolution()); // Inform the player so we can update the resolution #ifdef HAS_VIDEO_PLAYBACK g_renderManager.Update(); #endif g_windowManager.SendMessage(GUI_MSG_NOTIFY_ALL, 0, 0, GUI_MSG_WINDOW_RESIZE); } break; case GUI_MSG_WINDOW_INIT: { CGUIWindow::OnMessage(message); g_windowManager.ShowOverlay(OVERLAY_STATE_HIDDEN); g_graphicsContext.SetCalibrating(true); // Get the allowable resolutions that we can calibrate... m_Res.clear(); if (g_application.m_pPlayer->IsPlayingVideo()) { // don't allow resolution switching if we are playing a video #ifdef HAS_VIDEO_PLAYBACK RESOLUTION res = g_renderManager.GetResolution(); g_graphicsContext.SetVideoResolution(res); // Inform the renderer so we can update the resolution g_renderManager.Update(); #endif m_iCurRes = 0; m_Res.push_back(g_graphicsContext.GetVideoResolution()); SET_CONTROL_VISIBLE(CONTROL_VIDEO); } else { SET_CONTROL_HIDDEN(CONTROL_VIDEO); m_iCurRes = (unsigned int)-1; g_graphicsContext.GetAllowedResolutions(m_Res); // find our starting resolution m_iCurRes = FindCurrentResolution(); } if (m_iCurRes==(unsigned int)-1) { CLog::Log(LOGERROR, "CALIBRATION: Reported current resolution: %d", (int)g_graphicsContext.GetVideoResolution()); CLog::Log(LOGERROR, "CALIBRATION: Could not determine current resolution, falling back to default"); m_iCurRes = 0; } // Setup the first control m_iControl = CONTROL_TOP_LEFT; ResetControls(); return true; } break; case GUI_MSG_CLICKED: { // clicked - change the control... NextControl(); } break; case GUI_MSG_NOTIFY_ALL: { if (message.GetParam1() == GUI_MSG_WINDOW_RESIZE) { m_iCurRes = FindCurrentResolution(); } } break; // send before touch for requesting gesture features - we don't want this // it would result in unfocus in the onmessage below ... case GUI_MSG_GESTURE_NOTIFY: // send after touch for unfocussing - we don't want this in this window! case GUI_MSG_UNFOCUS_ALL: return true; break; } return CGUIWindow::OnMessage(message); }
HRESULT Rayman3XInput_DirectInputDevice8A::SetDataFormat(LPCDIDATAFORMAT lpdf) { Debug("R3XI: SetDataFormat called\n"); ResetControls(); if (lpdf->dwSize != sizeof(DIDATAFORMAT) || lpdf->dwObjSize != sizeof(DIOBJECTDATAFORMAT)) { Debug("SetDataFormat called with invalid lpdf\n"); return DIERR_INVALIDPARAM; } for (DWORD i = 0; i < lpdf->dwNumObjs; ++i) { LPDIOBJECTDATAFORMAT odf = &lpdf->rgodf[i]; Debug("Object %d:\n", i); if (odf->pguid == NULL) { Debug(" GUID: NULL\n"); } else { OLECHAR* guidStr; StringFromCLSID(*odf->pguid, &guidStr); Debug(" GUID: %S\n", guidStr); CoTaskMemFree(guidStr); } Debug(" Offset: %d\n", odf->dwOfs); Debug(" Type: 0x%.08X\n", odf->dwType); Debug(" Flags: 0x%.08X\n", odf->dwFlags); if (odf->pguid != NULL) { // Find first available control with matching GUID ControlList::const_iterator it; for (it = m_availableControls.begin(); it != m_availableControls.end(); ++it) { if ((*it)->GetGUID() == *odf->pguid) { break; } } if (it != m_availableControls.end() && (*it)->IsTypeCompatible(DIDFT_GETTYPE(odf->dwType))) { // Assign the control to the offset Debug("Control assigned\n"); m_assignedControls[odf->dwOfs] = *it; m_availableControls.erase(it); } else { // No matching control found. Assign a "zero" control. Debug("No control assigned; assigning zero control\n"); AssignZeroControl(odf->dwOfs, DIDFT_GETTYPE(odf->dwType)); } } else { // Find first available control compatible with type ControlList::const_iterator it; for (it = m_availableControls.begin(); it != m_availableControls.end(); ++it) { if ((*it)->IsTypeCompatible(DIDFT_GETTYPE(odf->dwType))) { break; } } if (it != m_availableControls.end()) { Debug("Control assigned\n"); // Assign the control to the offset m_assignedControls[odf->dwOfs] = *it; m_availableControls.erase(it); } else { Debug("No control assigned; assigning zero control\n"); // No matching control found. Assign a "zero" control. AssignZeroControl(odf->dwOfs, DIDFT_GETTYPE(odf->dwType)); } } } return DI_OK; }
CPlayers::~CPlayers() { ResetControls(); for (size_t i = 0; i < avatars.size(); i++) delete avatars[i].texture; }
void CarPhysicsObject::Update(float dt) { float force = 0.f; if(throttling) { force+= engineForce; } if(breaking) { force+= breakForce; } if(!throttling && !breaking && carSpeed > 0.f) { force = -0.000005f; } if(steeringRight) { if(steerAngle < 0.f) steerAngle = 0.f; steerAngle += 0.0001 *dt * (1.f - abs(steerAngle)/maxSteerAngle); if(steerAngle > maxSteerAngle) steerAngle = maxSteerAngle; } if(steeringLeft) { if(steerAngle > 0.f) steerAngle = 0.f; steerAngle -= 0.0001 *dt * (1.f - abs(steerAngle)/maxSteerAngle); if(steerAngle < -maxSteerAngle) steerAngle = -maxSteerAngle; } if(!steeringRight && !steeringLeft) { if(steerAngle > 0.f) steerAngle -= 0.0001 *dt; else if(steerAngle < 0.f) steerAngle += 0.0001 *dt; if(steerAngle > -0.001 && steerAngle < 0.001f) steerAngle = 0.f; } //force = 0.f; float acc = force / mass; carSpeed = sqrt(velocity.x*velocity.x + velocity.z*velocity.z) + acc*dt; if(carSpeed<0.01f && breaking) { carSpeed = 0.f; velocity = glm::vec3(0.f); } if(carSpeed > maxCarSpeed) { carSpeed = maxCarSpeed; } //printf("CarSpeed: (%.3f, %.3f)\n", velocity.x, velocity.z); glm::vec2 carLocation = glm::vec2(position.x, position.z); //printf("CarLocation: (%.3f, %.3f)\n", position.x, position.z); glm::vec2 frontWheel = carLocation + wheelBase/2 * glm::vec2( cos(carHeading) , sin(carHeading) ); glm::vec2 backWheel = carLocation - wheelBase/2 * glm::vec2( cos(carHeading) , sin(carHeading) ); backWheel += carSpeed * dt * glm::vec2(cos(carHeading) , sin(carHeading)); frontWheel += carSpeed * dt * glm::vec2(cos(carHeading+steerAngle) , sin(carHeading+steerAngle)); carLocation = (frontWheel + backWheel) / 2.f; carHeading = atan2( frontWheel.y - backWheel.y , frontWheel.x - backWheel.x ); //printf("CarHeading: %.3f\n", carHeading); position = glm::vec3(carLocation.x, 0.f, carLocation.y); velocity = carSpeed * glm::normalize(glm::vec3(cos(carHeading), 0.f, sin(carHeading))); boundingBox->SetCenter(position); ResetControls(); }
CarPhysicsObject::CarPhysicsObject():steerAngle(0.f), carHeading(3.14f/2.f), wheelBase(10.f), carSpeed(0.f), engineForce(0.00005f), breakForce(-0.0001f), maxCarSpeed(0.2f), maxSteerAngle(M_PI / 6.f) { velocity = carSpeed * glm::normalize(glm::vec3(cos(carHeading), 0.f, sin(carHeading))); ResetControls(); }
/**************************************************************************** * DefaultSettings * * Sets all the defaults! ***************************************************************************/ void DefaultSettings () { memset (&GCSettings, 0, sizeof (GCSettings)); ResetControls(); // controller button mappings GCSettings.LoadMethod = DEVICE_AUTO; // Auto, SD, DVD, USB, Network (SMB) GCSettings.SaveMethod = DEVICE_AUTO; // Auto, SD, USB, Network (SMB) sprintf (GCSettings.LoadFolder, "%s/roms", APPFOLDER); // Path to game files sprintf (GCSettings.SaveFolder, "%s/saves", APPFOLDER); // Path to save files sprintf (GCSettings.CheatFolder, "%s/cheats", APPFOLDER); // Path to cheat files sprintf (GCSettings.ScreenshotsFolder, "%s/screenshots", APPFOLDER); // Path to cheat files GCSettings.AutoLoad = 1; GCSettings.AutoSave = 1; GCSettings.Controller = CTRL_PAD2; GCSettings.videomode = 0; // automatic video mode detection GCSettings.render = 2; // Unfiltered GCSettings.FilterMethod = FILTER_NONE; // no hq2x GCSettings.widescreen = 0; // no aspect ratio correction GCSettings.zoomHor = 1.0; // horizontal zoom level GCSettings.zoomVert = 1.0; // vertical zoom level GCSettings.xshift = 0; // horizontal video shift GCSettings.yshift = 0; // vertical video shift GCSettings.crosshair = 1; GCSettings.WiimoteOrientation = 0; GCSettings.ExitAction = 0; GCSettings.MusicVolume = 40; GCSettings.SFXVolume = 40; GCSettings.Rumble = 1; #ifdef HW_RVL GCSettings.language = CONF_GetLanguage(); if(GCSettings.language == LANG_JAPANESE || GCSettings.language == LANG_SIMP_CHINESE || GCSettings.language == LANG_TRAD_CHINESE || GCSettings.language == LANG_KOREAN) GCSettings.language = LANG_ENGLISH; #else GCSettings.language = LANG_ENGLISH; #endif /****************** SNES9x Settings ***********************/ // Default ALL to false memset (&Settings, 0, sizeof (Settings)); // General Settings.MouseMaster = true; Settings.SuperScopeMaster = true; Settings.JustifierMaster = true; Settings.MultiPlayer5Master = true; Settings.DontSaveOopsSnapshot = true; Settings.ApplyCheats = true; Settings.BlockInvalidVRAMAccess = false; Settings.HDMATimingHack = 100; // Sound defaults. On Wii this is 32Khz/16bit/Stereo //Settings.SoundSync = true; Settings.SixteenBitSound = true; Settings.Stereo = true; Settings.ReverseStereo = true; Settings.SoundPlaybackRate = 32000; Settings.SoundInputRate = 31953; // Graphics Settings.Transparency = true; Settings.SupportHiRes = true; Settings.SkipFrames = AUTO_FRAMERATE; Settings.TurboSkipFrames = 19; Settings.DisplayFrameRate = false; Settings.AutoDisplayMessages = 0; Settings.InitialInfoStringTimeout = 200; // # frames to display messages for // Frame timings in 50hz and 60hz cpu mode Settings.FrameTimePAL = 20000; Settings.FrameTimeNTSC = 16667; }
Rayman3XInput_DirectInputDevice8A::Rayman3XInput_DirectInputDevice8A() : m_refCount(1) { ResetControls(); }
/**************************************************************************** * DefaultSettings * * Sets all the defaults! ***************************************************************************/ void DefaultSettings () { memset (&GCSettings, 0, sizeof (GCSettings)); ResetControls(); // controller button mappings GCSettings.LoadMethod = DEVICE_AUTO; // Auto, SD, DVD, USB, Network (SMB) GCSettings.SaveMethod = DEVICE_AUTO; // Auto, SD, USB, Network (SMB) sprintf (GCSettings.LoadFolder, "%s/roms", APPFOLDER); // Path to game files sprintf (GCSettings.SaveFolder, "%s/saves", APPFOLDER); // Path to save files sprintf (GCSettings.CheatFolder, "%s/cheats", APPFOLDER); // Path to cheat files sprintf (GCSettings.ScreenshotsFolder, "%s/screenshots", APPFOLDER); sprintf (GCSettings.BorderFolder, "%s/borders", APPFOLDER); sprintf (GCSettings.CoverFolder, "%s/covers", APPFOLDER); // Path to cover files sprintf (GCSettings.ArtworkFolder, "%s/artworks", APPFOLDER); // Path to artwork files sprintf (GCSettings.ImageFolder, "%s/screenshots", APPFOLDER); GCSettings.AutoLoad = 1; GCSettings.AutoSave = 1; GCSettings.AppendAuto = 1; GCSettings.WiimoteOrientation = 0; GCSettings.gbaZoomHor = 1.0; // GBA horizontal zoom level GCSettings.gbaZoomVert = 1.0; // GBA vertical zoom level GCSettings.gbZoomHor = 1.0; // GBA horizontal zoom level GCSettings.gbZoomVert = 1.0; // GBA vertical zoom level GCSettings.gbFixed = 0; // not fixed - use zoom level GCSettings.gbaFixed = 0; // not fixed - use zoom level GCSettings.videomode = 0; // automatic video mode detection GCSettings.render = 1; // Filtered GCSettings.scaling = 1; // partial stretch GCSettings.WiiControls = false; // Match Wii Game GCSettings.xshift = 0; // horizontal video shift GCSettings.yshift = 0; // vertical video shift GCSettings.colorize = 0; // Colorize mono gameboy games GCSettings.gbaFrameskip = 1; // Turn auto-frameskip on for GBA games GCSettings.WiimoteOrientation = 0; GCSettings.ExitAction = 0; GCSettings.MusicVolume = 40; GCSettings.SFXVolume = 40; GCSettings.Rumble = 1; GCSettings.PreviewImage = 0; GCSettings.BasicPalette = 0; #ifdef HW_RVL GCSettings.language = CONF_GetLanguage(); if(GCSettings.language == LANG_JAPANESE || GCSettings.language == LANG_SIMP_CHINESE || GCSettings.language == LANG_TRAD_CHINESE || GCSettings.language == LANG_KOREAN) GCSettings.language = LANG_ENGLISH; #else GCSettings.language = LANG_ENGLISH; #endif GCSettings.OffsetMinutesUTC = 0; GCSettings.GBHardware = 0; GCSettings.SGBBorder = 0; }
//------------------------------------------------------------------------------ // CControlPos::~CControlPos // // default destructor -- It deletes all controls. // // Access: public // // Args: // none // // Return: // none // CControlPos::~CControlPos() { ResetControls(); }
void CSearchDlg::OnBnClickedStop(wxCommandEvent& WXUNUSED(evt)) { theApp->searchlist->StopSearch(); ResetControls(); }
void CSearchDlg::LocalSearchEnd() { ResetControls(); }
bool CGUIWindowSettingsScreenCalibration::OnMessage(CGUIMessage& message) { switch ( message.GetMessage() ) { case GUI_MSG_WINDOW_DEINIT: { CDisplaySettings::GetInstance().UpdateCalibrations(); CServiceBroker::GetSettings()->Save(); CServiceBroker::GetWinSystem()->GetGfxContext().SetCalibrating(false); // reset our screen resolution to what it was initially CServiceBroker::GetWinSystem()->GetGfxContext().SetVideoResolution(CDisplaySettings::GetInstance().GetCurrentResolution(), false); CServiceBroker::GetGUI()->GetWindowManager().SendMessage(GUI_MSG_NOTIFY_ALL, 0, 0, GUI_MSG_WINDOW_RESIZE); } break; case GUI_MSG_WINDOW_INIT: { CGUIWindow::OnMessage(message); CServiceBroker::GetWinSystem()->GetGfxContext().SetCalibrating(true); // Get the allowable resolutions that we can calibrate... m_Res.clear(); if (g_application.GetAppPlayer().IsPlayingVideo()) { // don't allow resolution switching if we are playing a video g_application.GetAppPlayer().TriggerUpdateResolution(); m_iCurRes = 0; m_Res.push_back(CServiceBroker::GetWinSystem()->GetGfxContext().GetVideoResolution()); SET_CONTROL_VISIBLE(CONTROL_VIDEO); } else { SET_CONTROL_HIDDEN(CONTROL_VIDEO); m_iCurRes = (unsigned int)-1; CServiceBroker::GetWinSystem()->GetGfxContext().GetAllowedResolutions(m_Res); // find our starting resolution m_iCurRes = FindCurrentResolution(); } if (m_iCurRes==(unsigned int)-1) { CLog::Log(LOGERROR, "CALIBRATION: Reported current resolution: %d", (int)CServiceBroker::GetWinSystem()->GetGfxContext().GetVideoResolution()); CLog::Log(LOGERROR, "CALIBRATION: Could not determine current resolution, falling back to default"); m_iCurRes = 0; } // Setup the first control m_iControl = CONTROL_TOP_LEFT; ResetControls(); return true; } break; case GUI_MSG_CLICKED: { // clicked - change the control... NextControl(); } break; case GUI_MSG_NOTIFY_ALL: { if (message.GetParam1() == GUI_MSG_WINDOW_RESIZE) { m_iCurRes = FindCurrentResolution(); } } break; // send before touch for requesting gesture features - we don't want this // it would result in unfocus in the onmessage below ... case GUI_MSG_GESTURE_NOTIFY: // send after touch for unfocussing - we don't want this in this window! case GUI_MSG_UNFOCUS_ALL: return true; break; } return CGUIWindow::OnMessage(message); }