Browse Source

Implement remaning keys

pull/25/head
Anders Jenbo 7 years ago
parent
commit
cead5831fd
  1. 5
      Stub/diabloui.cpp
  2. 3
      Stub/miniwin_msg_sdl.cpp
  3. 3
      Stub/sdlrender.cpp

5
Stub/diabloui.cpp

@ -32,7 +32,6 @@ BOOL __stdcall UiTitleDialog(int a1)
case SDL_MOUSEBUTTONDOWN:
return TRUE;
case SDL_QUIT:
SDL_Quit();
exit(0);
}
}
@ -548,7 +547,6 @@ BOOL __stdcall UiSelHeroSingDialog(
}
break;
case SDL_QUIT:
SDL_Quit();
exit(0);
}
}
@ -816,7 +814,6 @@ BOOL __stdcall UiSelHeroMultDialog(
}
break;
case SDL_QUIT:
SDL_Quit();
exit(0);
}
}
@ -860,7 +857,6 @@ BOOL __stdcall UiCreditsDialog(int a1)
case SDL_MOUSEBUTTONDOWN:
return TRUE;
case SDL_QUIT:
SDL_Quit();
exit(0);
}
}
@ -1022,7 +1018,6 @@ int __stdcall UiSelectProvider(int a1, _SNETPROGRAMDATA *client_info, _SNETPLAYE
}
break;
case SDL_QUIT:
SDL_Quit();
exit(0);
}
}

3
Stub/miniwin_msg_sdl.cpp

@ -13,6 +13,7 @@ static int translate_sdl_key(SDL_Keysym key)
case SDLK_ESCAPE:
return VK_ESCAPE;
case SDLK_RETURN:
case SDLK_KP_ENTER:
return VK_RETURN;
case SDLK_TAB:
return VK_TAB;
@ -63,6 +64,8 @@ static int translate_sdl_key(SDL_Keysym key)
case SDLK_LSHIFT:
case SDLK_RSHIFT:
return VK_SHIFT;
case SDLK_PRINTSCREEN:
return VK_SNAPSHOT;
default:
if (sym >= SDLK_a && sym <= SDLK_z) {

3
Stub/sdlrender.cpp

@ -719,11 +719,12 @@ void FreeMenuItems()
tmp = pPcxFont42yImage;
pPcxFont42yImage = NULL;
mem_free_dbg(tmp);
TTF_Quit();
}
void SdlDiabloMainWindow()
{
atexit(SDL_Quit);
atexit(TTF_Quit);
SDL_Init(SDL_INIT_EVERYTHING);
window = SDL_CreateWindow("Diablo", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, SCREEN_WIDTH, SCREEN_HEIGHT, SDL_WINDOW_RESIZABLE);

Loading…
Cancel
Save