config.logwindow_width = MyGetPrivateProfileInt(_T("Qt"), _T("LogWindowWidth"), 800, config_path);
config.logwindow_height = MyGetPrivateProfileInt(_T("Qt"), _T("LogWindowHeight"), 500, config_path);
// Assigning joysticks.
-#if 0
for(i = 0; i < 16; i++) {
_TCHAR name[256];
my_stprintf_s(name, 255, _T("AssignedJoystick%d"), i + 1);
config.assigned_joystick_name[i], 255, config_path);
printf("%d->%s\n", i, config.assigned_joystick_name[i]);
}
-#endif
-
// Movie load/save.
config.video_width = MyGetPrivateProfileInt(_T("Qt"), _T("VideoWidth"), 640, config_path);
if(config.video_width < 128) config.video_width = 128;
names[num] = QString::fromUtf8(SDL_GameControllerNameForIndex(num));
csp_logger->debug_log(CSP_LOG_INFO, CSP_LOG_TYPE_JOYSTICK, "JoyThread : Controller %d : %s : is plugged.", num, names[num].toUtf8().constData());
strncpy(p_config->assigned_joystick_name[num], names[num].toUtf8().constData(),
- (sizeof(p_config->assigned_joystick_name) / sizeof(char)) - 1);
+ (sizeof(p_config->assigned_joystick_name[num]) / sizeof(char)) - 1);
joy_num[num] = num;
}
} else
names[i] = QString::fromUtf8(SDL_JoystickNameForIndex(num));
csp_logger->debug_log(CSP_LOG_INFO, CSP_LOG_TYPE_JOYSTICK, "JoyThread : Joystick %d : %s : is plugged.", num, names[i].toUtf8().data());
strncpy(p_config->assigned_joystick_name[num], names[num].toUtf8().constData(),
- (sizeof(p_config->assigned_joystick_name) / sizeof(char)) - 1);
+ (sizeof(p_config->assigned_joystick_name[num]) / sizeof(char)) - 1);
break;
}
}