mirror of
https://github.com/libretro/ppsspp.git
synced 2024-12-05 15:37:51 +00:00
Merge pull request #5264 from g2p/basic-layout-detection
Basic layout detection
This commit is contained in:
commit
88090a53a8
@ -764,6 +764,7 @@ elseif(SDL2_FOUND)
|
||||
set(TargetBin PPSSPPSDL)
|
||||
# Require SDL
|
||||
include_directories(${SDL2_INCLUDE_DIR})
|
||||
add_definitions(-DSDL)
|
||||
set(nativeExtra ${nativeExtra}
|
||||
SDL/SDLJoystick.h
|
||||
SDL/SDLJoystick.cpp
|
||||
|
@ -15,7 +15,9 @@
|
||||
// Official git repository and contact information can be found at
|
||||
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
|
||||
|
||||
#if defined(_WIN32) && !defined(_XBOX)
|
||||
#if defined(SDL)
|
||||
#include <SDL_keyboard.h>
|
||||
#elif defined(_WIN32) && !defined(_XBOX)
|
||||
#include <windows.h>
|
||||
#endif
|
||||
#include <set>
|
||||
@ -345,7 +347,16 @@ void SetDefaultKeyMap(DefaultMaps dmap, bool replace) {
|
||||
{
|
||||
bool azerty = false;
|
||||
bool qwertz = false;
|
||||
#if defined(_WIN32) && !defined(_XBOX)
|
||||
#if defined(SDL)
|
||||
char q, w, y;
|
||||
q = SDL_GetKeyFromScancode(SDL_SCANCODE_Q);
|
||||
w = SDL_GetKeyFromScancode(SDL_SCANCODE_W);
|
||||
y = SDL_GetKeyFromScancode(SDL_SCANCODE_Y);
|
||||
if (q == 'a' && w == 'z' && y == 'y')
|
||||
azerty = true;
|
||||
else if (q == 'q' && w == 'w' && y == 'z')
|
||||
qwertz = true;
|
||||
#elif defined(_WIN32) && !defined(_XBOX)
|
||||
HKL localeId = GetKeyboardLayout(0);
|
||||
// TODO: Is this list complete enough?
|
||||
switch ((int)localeId & 0xFFFF) {
|
||||
|
@ -38,7 +38,7 @@ macx|equals(PLATFORM_NAME, "linux") {
|
||||
PRE_TARGETDEPS += $$CONFIG_DIR/libCommon.a $$CONFIG_DIR/libCore.a $$CONFIG_DIR/libGPU.a $$CONFIG_DIR/libNative.a
|
||||
CONFIG += link_pkgconfig
|
||||
packagesExist(sdl2) {
|
||||
DEFINES += QT_HAS_SDL
|
||||
DEFINES += SDL
|
||||
SOURCES += $$P/SDL/SDLJoystick.cpp
|
||||
HEADERS += $$P/SDL/SDLJoystick.h
|
||||
PKGCONFIG += sdl2
|
||||
@ -54,7 +54,7 @@ unix:contains(QT_CONFIG, system-zlib) {
|
||||
}
|
||||
|
||||
# Qt Multimedia (if SDL is not found)
|
||||
!contains(DEFINES, QT_HAS_SDL) {
|
||||
!contains(DEFINES, SDL) {
|
||||
lessThan(QT_MAJOR_VERSION,5):!exists($$[QT_INSTALL_HEADERS]/QtMultimedia) {
|
||||
# Fallback to mobility audio
|
||||
CONFIG += mobility
|
||||
|
2
native
2
native
@ -1 +1 @@
|
||||
Subproject commit c958ca6b4c05364c1c2a4e3eda5b355328ec8049
|
||||
Subproject commit 3a400fdd381cd27f0f138e52c7e363ae182b3b5d
|
Loading…
Reference in New Issue
Block a user