[Fix] Configuration file issues.
This commit is contained in:
parent
782e11918c
commit
3db7241663
@ -122,7 +122,7 @@ int main(int argc, char** argv) {
|
||||
// Grab the keybindings if there are any.
|
||||
char* str;
|
||||
int type, key, reverse;
|
||||
for(i = 0; keybindNames[i]; i++) {
|
||||
for(i = 0; strcmp(keybindNames[i],"end"); i++) {
|
||||
lua_getglobal(L, keybindNames[i]);
|
||||
str = NULL;
|
||||
key = -1;
|
||||
|
@ -591,7 +591,7 @@ int gl_init(void) {
|
||||
DEBUG("Available fullscreen modes:");
|
||||
for(i = 0; modes[i]; ++i) {
|
||||
DEBUG("\t%dx%d", modes[i]->w, modes[i]->h);
|
||||
if(flags & SDL_FULLSCREEN && modes[i]->w == gl_screen.w && modes[i]->h == gl_screen.h)
|
||||
if((flags & SDL_FULLSCREEN) && (modes[i]->w == gl_screen.w) && (modes[i]->h == gl_screen.h))
|
||||
supported = 1;
|
||||
}
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ typedef struct {
|
||||
static Keybind** player_input; // Contains the players keybindings.
|
||||
// Name of each keybinding.
|
||||
const char* keybindNames[] = { "accel", "left", "right", "primary", "target",
|
||||
"target_nearest", "mapzoomin", "mapzoomout" };
|
||||
"target_nearest", "mapzoomin", "mapzoomout", "end" }; // Need to terminate in "end".
|
||||
|
||||
// Player stuff.
|
||||
Pilot* player = NULL; // extern in pilot.h
|
||||
@ -394,7 +394,7 @@ void input_init(void) {
|
||||
player_input = malloc(i*sizeof(Keybind*));
|
||||
|
||||
// Create a null keybinding for each.
|
||||
for(i = 0; keybindNames[i]; i++) {
|
||||
for(i = 0; strcmp(keybindNames[i], "end"); i++) {
|
||||
tmp = MALLOC_L(Keybind);
|
||||
tmp->name = (char*)keybindNames[i];
|
||||
tmp->type = KEYBIND_NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user