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

Method readConfig

src/drivers/Qt/input.cpp:247–271  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

245}
246
247int hotkey_t::readConfig(void)
248{
249 std::string keyText;
250 std::string prefix = "SDL.Hotkeys.";
251
252 g_config->getOption(prefix + configName, &keyText);
253
254 //printf("Config: '%s' = '%s'\n", configName, keyText.c_str() );
255 keySeq = QKeySequence( QString::fromStdString(keyText) );
256
257 if (shortcut)
258 {
259 shortcut->setKey(QString::fromStdString(keyText));
260
261 //printf("ShortCut: '%s' = '%s'\n", configName, shortcut->key().toString().toStdString().c_str() );
262
263 if (act)
264 {
265 act->setText(actText + "\t" + shortcut->key().toString());
266 }
267 }
268
269 conv2SDL();
270 return 0;
271}
272
273void hotkey_t::conv2SDL(void)
274{

Callers 1

setHotKeysFunction · 0.80

Calls 3

getOptionMethod · 0.80
setTextMethod · 0.80
toStringMethod · 0.80

Tested by

no test coverage detected