1
0
mirror of git://projects.qi-hardware.com/gmenu2x.git synced 2024-11-25 18:05:20 +02:00

The input.conf file will now be loaded from the user-specific directory or if missing, from the system directory.

This commit is contained in:
Ayla 2011-03-29 12:31:43 +02:00
parent 8693dff072
commit 83d6b954fb

View File

@ -329,7 +329,19 @@ GMenu2X::GMenu2X() {
}
initBG();
input.init(path+"input.conf");
/* If a user-specified input.conf file exists, we load it;
* otherwise, we load the default one. */
const char *input_file = (getHome() + "/input.conf").c_str();
if (fileExists(input_file)) {
DEBUG("Loading user-specific input.conf file: %s.\n", input_file);
} else {
input_file = GMENU2X_SYSTEM_DIR "/input.conf";
DEBUG("Loading system input.conf file: %s.\n", input_file);
}
input.init(input_file);
setInputSpeed();
initServices();
setBacklight(confInt["backlight"]);