MCPcopy Create free account
hub / github.com/TASEmulators/fceux / FCEUD_TurboToggle

Function FCEUD_TurboToggle

src/drivers/win/input.cpp:1878–1899  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1876 if (muteTurbo && soundo) InitSound();
1877 }
1878void FCEUD_TurboToggle(void)
1879{
1880 if (turbo) {
1881 winsync = tempwinsync; //If turbo was on, restore winsync
1882 soundquality = tempsoundquality; //and restore sound quality setting
1883 FCEUI_SetSoundQuality(soundquality);
1884 }
1885 else
1886 {
1887 tempwinsync = winsync; //Store video sync settings
1888 tempsoundquality = soundquality; //Store sound quality settings
1889 winsync = 0; //If turbo was off, turn off winsync (so that turbo can function even with VBlank sync methods
1890 FCEUI_SetSoundQuality(0); //Set sound quality to low
1891 }
1892
1893 turbo = !turbo;
1894 if (muteTurbo && soundo)
1895 {
1896 if (turbo) TrashSound();
1897 if (!turbo) InitSound();
1898 }
1899}
1900
1901void FCEUI_UseInputPreset(int preset)
1902{

Callers 1

AppWndProcFunction · 0.70

Calls 3

FCEUI_SetSoundQualityFunction · 0.85
TrashSoundFunction · 0.85
InitSoundFunction · 0.70

Tested by

no test coverage detected