diff --git a/config.def.h b/config.def.h index b0644c373f..58623bdd80 100644 --- a/config.def.h +++ b/config.def.h @@ -249,6 +249,13 @@ static bool quick_menu_show_save_game_overrides = true; static bool quick_menu_show_information = true; static bool menu_show_online_updater = true; +static bool menu_show_load_core = true; +static bool menu_show_load_content = true; +static bool menu_show_information = true; +static bool menu_show_configurations = true; +static bool menu_show_help = true; +static bool menu_show_quit_retroarch = true; +static bool menu_show_reboot = true; #if defined(HAVE_LAKKA) || defined(VITA) static bool menu_show_core_updater = false; diff --git a/configuration.c b/configuration.c index dd68e56c5e..e5998d8911 100644 --- a/configuration.c +++ b/configuration.c @@ -1213,6 +1213,13 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings, SETTING_BOOL("xmb_show_images", &settings->bools.menu_xmb_show_images, true, xmb_show_images, false); #endif SETTING_BOOL("xmb_show_music", &settings->bools.menu_xmb_show_music, true, xmb_show_music, false); + SETTING_BOOL("menu_show_load_core", &settings->bools.menu_show_load_core, true, menu_show_load_core, false); + SETTING_BOOL("menu_show_load_content", &settings->bools.menu_show_load_content, true, menu_show_load_content, false); + SETTING_BOOL("menu_show_information", &settings->bools.menu_show_information, true, menu_show_information, false); + SETTING_BOOL("menu_show_configurations", &settings->bools.menu_show_configurations, true, menu_show_configurations, false); + SETTING_BOOL("menu_show_help", &settings->bools.menu_show_help, true, menu_show_help, false); + SETTING_BOOL("menu_show_quit_retroarch", &settings->bools.menu_show_quit_retroarch, true, menu_show_quit_retroarch, false); + SETTING_BOOL("menu_show_reboot", &settings->bools.menu_show_reboot, true, menu_show_reboot, false); SETTING_BOOL("menu_show_online_updater", &settings->bools.menu_show_online_updater, true, menu_show_online_updater, false); SETTING_BOOL("menu_show_core_updater", &settings->bools.menu_show_core_updater, true, menu_show_core_updater, false); #ifdef HAVE_FFMPEG diff --git a/configuration.h b/configuration.h index 67881ef436..c8c7172d3d 100644 --- a/configuration.h +++ b/configuration.h @@ -127,6 +127,13 @@ typedef struct settings bool menu_horizontal_animation; bool menu_show_online_updater; bool menu_show_core_updater; + bool menu_show_load_core; + bool menu_show_load_content; + bool menu_show_information; + bool menu_show_configurations; + bool menu_show_help; + bool menu_show_quit_retroarch; + bool menu_show_reboot; bool menu_materialui_icons_enable; bool menu_xmb_shadows_enable; bool menu_xmb_show_settings; diff --git a/deps/libFLAC/bitreader.c b/deps/libFLAC/bitreader.c index fc6e89f671..e374476f2c 100644 --- a/deps/libFLAC/bitreader.c +++ b/deps/libFLAC/bitreader.c @@ -119,20 +119,20 @@ static INLINE void crc16_update_word_(FLAC__BitReader *br, brword word) register unsigned crc = br->read_crc16; #if FLAC__BYTES_PER_WORD == 4 switch(br->crc16_align) { - case 0: crc = FLAC__CRC16_UPDATE((unsigned)(word >> 24), crc); - case 8: crc = FLAC__CRC16_UPDATE((unsigned)((word >> 16) & 0xff), crc); - case 16: crc = FLAC__CRC16_UPDATE((unsigned)((word >> 8) & 0xff), crc); + case 0: crc = FLAC__CRC16_UPDATE((unsigned)(word >> 24), crc); /* fallthrough */ + case 8: crc = FLAC__CRC16_UPDATE((unsigned)((word >> 16) & 0xff), crc); /* fallthrough */ + case 16: crc = FLAC__CRC16_UPDATE((unsigned)((word >> 8) & 0xff), crc); /* fallthrough */ case 24: br->read_crc16 = FLAC__CRC16_UPDATE((unsigned)(word & 0xff), crc); } #elif FLAC__BYTES_PER_WORD == 8 switch(br->crc16_align) { - case 0: crc = FLAC__CRC16_UPDATE((unsigned)(word >> 56), crc); - case 8: crc = FLAC__CRC16_UPDATE((unsigned)((word >> 48) & 0xff), crc); - case 16: crc = FLAC__CRC16_UPDATE((unsigned)((word >> 40) & 0xff), crc); - case 24: crc = FLAC__CRC16_UPDATE((unsigned)((word >> 32) & 0xff), crc); - case 32: crc = FLAC__CRC16_UPDATE((unsigned)((word >> 24) & 0xff), crc); - case 40: crc = FLAC__CRC16_UPDATE((unsigned)((word >> 16) & 0xff), crc); - case 48: crc = FLAC__CRC16_UPDATE((unsigned)((word >> 8) & 0xff), crc); + case 0: crc = FLAC__CRC16_UPDATE((unsigned)(word >> 56), crc); /* fallthrough */ + case 8: crc = FLAC__CRC16_UPDATE((unsigned)((word >> 48) & 0xff), crc); /* fallthrough */ + case 16: crc = FLAC__CRC16_UPDATE((unsigned)((word >> 40) & 0xff), crc); /* fallthrough */ + case 24: crc = FLAC__CRC16_UPDATE((unsigned)((word >> 32) & 0xff), crc); /* fallthrough */ + case 32: crc = FLAC__CRC16_UPDATE((unsigned)((word >> 24) & 0xff), crc); /* fallthrough */ + case 40: crc = FLAC__CRC16_UPDATE((unsigned)((word >> 16) & 0xff), crc); /* fallthrough */ + case 48: crc = FLAC__CRC16_UPDATE((unsigned)((word >> 8) & 0xff), crc); /* fallthrough */ case 56: br->read_crc16 = FLAC__CRC16_UPDATE((unsigned)(word & 0xff), crc); } #else diff --git a/gfx/include/d3d9.h b/gfx/include/d3d9.h index 45ee23e02f..9c9991080e 100644 --- a/gfx/include/d3d9.h +++ b/gfx/include/d3d9.h @@ -12,9 +12,9 @@ #ifndef DIRECT3D_VERSION #define DIRECT3D_VERSION 0x0900 -#endif //DIRECT3D_VERSION +#endif /* DIRECT3D_VERSION */ -// include this file content only if compiling for DX9 interfaces +/* include this file content only if compiling for DX9 interfaces */ #if(DIRECT3D_VERSION >= 0x0900) @@ -51,11 +51,11 @@ DEFINE_GUID(IID_IDirect3D9, 0x81bdcbca, 0x64d4, 0x426d, 0xae, 0x8d, 0xad, 0x1, 0x47, 0xf4, 0x27, 0x5c); /* IID_IDirect3DDevice9 */ -// {D0223B96-BF7A-43fd-92BD-A43B0D82B9EB} */ +/* {D0223B96-BF7A-43fd-92BD-A43B0D82B9EB} */ DEFINE_GUID(IID_IDirect3DDevice9, 0xd0223b96, 0xbf7a, 0x43fd, 0x92, 0xbd, 0xa4, 0x3b, 0xd, 0x82, 0xb9, 0xeb); /* IID_IDirect3DResource9 */ -// {05EEC05D-8F7D-4362-B999-D1BAF357C704} +/* {05EEC05D-8F7D-4362-B999-D1BAF357C704} */ DEFINE_GUID(IID_IDirect3DResource9, 0x5eec05d, 0x8f7d, 0x4362, 0xb9, 0x99, 0xd1, 0xba, 0xf3, 0x57, 0xc7, 0x4); /* IID_IDirect3DBaseTexture9 */ diff --git a/gfx/include/d3d9/d3dx9.h b/gfx/include/d3d9/d3dx9.h index f1a00bb971..e2d40f1aff 100644 --- a/gfx/include/d3d9/d3dx9.h +++ b/gfx/include/d3d9/d3dx9.h @@ -1,11 +1,11 @@ -////////////////////////////////////////////////////////////////////////////// -// -// Copyright (C) Microsoft Corporation. All Rights Reserved. -// -// File: d3dx9.h -// Content: D3DX utility library -// -////////////////////////////////////////////////////////////////////////////// +/* + * + * Copyright (C) Microsoft Corporation. All Rights Reserved. + * + * File: d3dx9.h + * Content: D3DX utility library + * + */ #ifdef __D3DX_INTERNAL__ #error Incorrect D3DX header used @@ -14,8 +14,7 @@ #ifndef __D3DX9_H__ #define __D3DX9_H__ - -// Defines +/* Defines */ #include #define D3DX_DEFAULT ((UINT) -1) @@ -40,9 +39,7 @@ #endif #endif - - -// Includes +/* Includes */ #include "d3d9.h" #include "d3dx9math.h" #include "d3dx9core.h" @@ -55,9 +52,7 @@ #include "d3dx9shape.h" #include "d3dx9anim.h" - - -// Errors +/* Errors */ #define _FACDD 0x876 #define MAKE_DDHRESULT( code ) MAKE_HRESULT( 1, _FACDD, code ) @@ -74,4 +69,4 @@ enum _D3DXERR { }; -#endif //__D3DX9_H__ +#endif /*__D3DX9_H__ */ diff --git a/gfx/include/d3d9/d3dx9anim.h b/gfx/include/d3d9/d3dx9anim.h index 33d52eb0ee..ecdabdc52c 100644 --- a/gfx/include/d3d9/d3dx9anim.h +++ b/gfx/include/d3d9/d3dx9anim.h @@ -1,28 +1,27 @@ -////////////////////////////////////////////////////////////////////////////// -// -// Copyright (C) Microsoft Corporation. All Rights Reserved. -// -// File: d3dx9anim.h -// Content: D3DX mesh types and functions -// -////////////////////////////////////////////////////////////////////////////// +/* + * + * Copyright (C) Microsoft Corporation. All Rights Reserved. + * + * File: d3dx9anim.h + * Content: D3DX mesh types and functions + */ #ifndef __D3DX9ANIM_H__ #define __D3DX9ANIM_H__ -// {698CFB3F-9289-4d95-9A57-33A94B5A65F9} +/* {698CFB3F-9289-4d95-9A57-33A94B5A65F9} */ DEFINE_GUID(IID_ID3DXAnimationSet, 0x698cfb3f, 0x9289, 0x4d95, 0x9a, 0x57, 0x33, 0xa9, 0x4b, 0x5a, 0x65, 0xf9); -// {FA4E8E3A-9786-407d-8B4C-5995893764AF} +/* {FA4E8E3A-9786-407d-8B4C-5995893764AF} */ DEFINE_GUID(IID_ID3DXKeyframedAnimationSet, 0xfa4e8e3a, 0x9786, 0x407d, 0x8b, 0x4c, 0x59, 0x95, 0x89, 0x37, 0x64, 0xaf); -// {6CC2480D-3808-4739-9F88-DE49FACD8D4C} +/* {6CC2480D-3808-4739-9F88-DE49FACD8D4C} */ DEFINE_GUID(IID_ID3DXCompressedAnimationSet, 0x6cc2480d, 0x3808, 0x4739, 0x9f, 0x88, 0xde, 0x49, 0xfa, 0xcd, 0x8d, 0x4c); -// {AC8948EC-F86D-43e2-96DE-31FC35F96D9E} +/* {AC8948EC-F86D-43e2-96DE-31FC35F96D9E} */ DEFINE_GUID(IID_ID3DXAnimationController, 0xac8948ec, 0xf86d, 0x43e2, 0x96, 0xde, 0x31, 0xfc, 0x35, 0xf9, 0x6d, 0x9e); @@ -134,20 +133,20 @@ DECLARE_INTERFACE(ID3DXSaveUserData) LPD3DXFILESAVEOBJECT pXofSave, LPD3DXFILESAVEDATA pXofMeshData) PURE; - // NOTE: this is called once per Save. All top level objects should be added using the - // provided interface. One call adds objects before the frame hierarchy, the other after + /* NOTE: this is called once per Save. All top level objects should be added using the + * provided interface. One call adds objects before the frame hierarchy, the other after */ STDMETHOD(AddTopLevelDataObjectsPre)(LPD3DXFILESAVEOBJECT pXofSave) PURE; STDMETHOD(AddTopLevelDataObjectsPost)(LPD3DXFILESAVEOBJECT pXofSave) PURE; - // callbacks for the user to register and then save templates to the XFile + /* callbacks for the user to register and then save templates to the XFile */ STDMETHOD(RegisterTemplates)(LPD3DXFILE pXFileApi) PURE; STDMETHOD(SaveTemplates)(LPD3DXFILESAVEOBJECT pXofSave) PURE; }; typedef enum _D3DXCALLBACK_SEARCH_FLAGS { - D3DXCALLBACK_SEARCH_EXCLUDING_INITIAL_POSITION = 0x01, // exclude callbacks at the initial position from the search - D3DXCALLBACK_SEARCH_BEHIND_INITIAL_POSITION = 0x02, // reverse the callback search direction + D3DXCALLBACK_SEARCH_EXCLUDING_INITIAL_POSITION = 0x01, /* exclude callbacks at the initial position from the search */ + D3DXCALLBACK_SEARCH_BEHIND_INITIAL_POSITION = 0x02, /* reverse the callback search direction */ D3DXCALLBACK_SEARCH_FORCE_DWORD = 0x7fffffff, } D3DXCALLBACK_SEARCH_FLAGS; @@ -160,37 +159,37 @@ typedef interface ID3DXAnimationSet *LPD3DXANIMATIONSET; DECLARE_INTERFACE_(ID3DXAnimationSet, IUnknown) { - // IUnknown + /* IUnknown */ STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE; STDMETHOD_(ULONG, AddRef)(THIS) PURE; STDMETHOD_(ULONG, Release)(THIS) PURE; - // Name + /* Name */ STDMETHOD_(LPCSTR, GetName)(THIS) PURE; - // Period + /* Period */ STDMETHOD_(DOUBLE, GetPeriod)(THIS) PURE; - STDMETHOD_(DOUBLE, GetPeriodicPosition)(THIS_ DOUBLE Position) PURE; // Maps position into animation period + STDMETHOD_(DOUBLE, GetPeriodicPosition)(THIS_ DOUBLE Position) PURE; /* Maps position into animation period */ - // Animation names + /* Animation names */ STDMETHOD_(UINT, GetNumAnimations)(THIS) PURE; STDMETHOD(GetAnimationNameByIndex)(THIS_ UINT Index, LPCSTR *ppName) PURE; STDMETHOD(GetAnimationIndexByName)(THIS_ LPCSTR pName, UINT *pIndex) PURE; - // SRT + /* SRT */ STDMETHOD(GetSRT)(THIS_ - DOUBLE PeriodicPosition, // Position mapped to period (use GetPeriodicPosition) - UINT Animation, // Animation index - D3DXVECTOR3 *pScale, // Returns the scale - D3DXQUATERNION *pRotation, // Returns the rotation as a quaternion - D3DXVECTOR3 *pTranslation) PURE; // Returns the translation + DOUBLE PeriodicPosition, /* Position mapped to period (use GetPeriodicPosition) */ + UINT Animation, /* Animation index */ + D3DXVECTOR3 *pScale, /* Returns the scale */ + D3DXQUATERNION *pRotation, /* Returns the rotation as a quaternion */ + D3DXVECTOR3 *pTranslation) PURE; /* Returns the translation */ - // Callbacks + /* Callbacks */ STDMETHOD(GetCallback)(THIS_ - DOUBLE Position, // Position from which to find callbacks - DWORD Flags, // Callback search flags - DOUBLE *pCallbackPosition, // Returns the position of the callback - LPVOID *ppCallbackData) PURE; // Returns the callback data pointer + DOUBLE Position, /* Position from which to find callbacks */ + DWORD Flags, /* Callback search flags */ + DOUBLE *pCallbackPosition, /* Returns the position of the callback */ + LPVOID *ppCallbackData) PURE; /* Returns the callback data pointer */ }; typedef enum _D3DXPLAYBACK_TYPE @@ -235,98 +234,98 @@ typedef interface ID3DXKeyframedAnimationSet *LPD3DXKEYFRAMEDANIMATIONSET; DECLARE_INTERFACE_(ID3DXKeyframedAnimationSet, ID3DXAnimationSet) { - // ID3DXAnimationSet + /* ID3DXAnimationSet */ STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE; STDMETHOD_(ULONG, AddRef)(THIS) PURE; STDMETHOD_(ULONG, Release)(THIS) PURE; - // Name + /* Name */ STDMETHOD_(LPCSTR, GetName)(THIS) PURE; - // Period + /* Period */ STDMETHOD_(DOUBLE, GetPeriod)(THIS) PURE; - STDMETHOD_(DOUBLE, GetPeriodicPosition)(THIS_ DOUBLE Position) PURE; // Maps position into animation period + STDMETHOD_(DOUBLE, GetPeriodicPosition)(THIS_ DOUBLE Position) PURE; /* Maps position into animation period */ - // Animation names + /* Animation names */ STDMETHOD_(UINT, GetNumAnimations)(THIS) PURE; STDMETHOD(GetAnimationNameByIndex)(THIS_ UINT Index, LPCSTR *ppName) PURE; STDMETHOD(GetAnimationIndexByName)(THIS_ LPCSTR pName, UINT *pIndex) PURE; - // SRT + /* SRT */ STDMETHOD(GetSRT)(THIS_ - DOUBLE PeriodicPosition, // Position mapped to period (use GetPeriodicPosition) - UINT Animation, // Animation index - D3DXVECTOR3 *pScale, // Returns the scale - D3DXQUATERNION *pRotation, // Returns the rotation as a quaternion - D3DXVECTOR3 *pTranslation) PURE; // Returns the translation + DOUBLE PeriodicPosition, /* Position mapped to period (use GetPeriodicPosition) */ + UINT Animation, /* Animation index */ + D3DXVECTOR3 *pScale, /* Returns the scale */ + D3DXQUATERNION *pRotation, /* Returns the rotation as a quaternion */ + D3DXVECTOR3 *pTranslation) PURE; /* Returns the translation */ - // Callbacks + /* Callbacks */ STDMETHOD(GetCallback)(THIS_ - DOUBLE Position, // Position from which to find callbacks - DWORD Flags, // Callback search flags - DOUBLE *pCallbackPosition, // Returns the position of the callback - LPVOID *ppCallbackData) PURE; // Returns the callback data pointer + DOUBLE Position, /* Position from which to find callbacks */ + DWORD Flags, /* Callback search flags */ + DOUBLE *pCallbackPosition, /* Returns the position of the callback */ + LPVOID *ppCallbackData) PURE; /* Returns the callback data pointer */ - // Playback + /* Playback */ STDMETHOD_(D3DXPLAYBACK_TYPE, GetPlaybackType)(THIS) PURE; STDMETHOD_(DOUBLE, GetSourceTicksPerSecond)(THIS) PURE; - // Scale keys + /* Scale keys */ STDMETHOD_(UINT, GetNumScaleKeys)(THIS_ UINT Animation) PURE; STDMETHOD(GetScaleKeys)(THIS_ UINT Animation, LPD3DXKEY_VECTOR3 pScaleKeys) PURE; STDMETHOD(GetScaleKey)(THIS_ UINT Animation, UINT Key, LPD3DXKEY_VECTOR3 pScaleKey) PURE; STDMETHOD(SetScaleKey)(THIS_ UINT Animation, UINT Key, LPD3DXKEY_VECTOR3 pScaleKey) PURE; - // Rotation keys + /* Rotation keys */ STDMETHOD_(UINT, GetNumRotationKeys)(THIS_ UINT Animation) PURE; STDMETHOD(GetRotationKeys)(THIS_ UINT Animation, LPD3DXKEY_QUATERNION pRotationKeys) PURE; STDMETHOD(GetRotationKey)(THIS_ UINT Animation, UINT Key, LPD3DXKEY_QUATERNION pRotationKey) PURE; STDMETHOD(SetRotationKey)(THIS_ UINT Animation, UINT Key, LPD3DXKEY_QUATERNION pRotationKey) PURE; - // Translation keys + /* Translation keys */ STDMETHOD_(UINT, GetNumTranslationKeys)(THIS_ UINT Animation) PURE; STDMETHOD(GetTranslationKeys)(THIS_ UINT Animation, LPD3DXKEY_VECTOR3 pTranslationKeys) PURE; STDMETHOD(GetTranslationKey)(THIS_ UINT Animation, UINT Key, LPD3DXKEY_VECTOR3 pTranslationKey) PURE; STDMETHOD(SetTranslationKey)(THIS_ UINT Animation, UINT Key, LPD3DXKEY_VECTOR3 pTranslationKey) PURE; - // Callback keys + /* Callback keys */ STDMETHOD_(UINT, GetNumCallbackKeys)(THIS) PURE; STDMETHOD(GetCallbackKeys)(THIS_ LPD3DXKEY_CALLBACK pCallbackKeys) PURE; STDMETHOD(GetCallbackKey)(THIS_ UINT Key, LPD3DXKEY_CALLBACK pCallbackKey) PURE; STDMETHOD(SetCallbackKey)(THIS_ UINT Key, LPD3DXKEY_CALLBACK pCallbackKey) PURE; - // Key removal methods. These are slow, and should not be used once the animation starts playing + /* Key removal methods. These are slow, and should not be used once the animation starts playing */ STDMETHOD(UnregisterScaleKey)(THIS_ UINT Animation, UINT Key) PURE; STDMETHOD(UnregisterRotationKey)(THIS_ UINT Animation, UINT Key) PURE; STDMETHOD(UnregisterTranslationKey)(THIS_ UINT Animation, UINT Key) PURE; - // One-time animaton SRT keyframe registration + /* One-time animaton SRT keyframe registration */ STDMETHOD(RegisterAnimationSRTKeys)(THIS_ - LPCSTR pName, // Animation name - UINT NumScaleKeys, // Number of scale keys - UINT NumRotationKeys, // Number of rotation keys - UINT NumTranslationKeys, // Number of translation keys - CONST D3DXKEY_VECTOR3 *pScaleKeys, // Array of scale keys - CONST D3DXKEY_QUATERNION *pRotationKeys, // Array of rotation keys - CONST D3DXKEY_VECTOR3 *pTranslationKeys, // Array of translation keys - DWORD *pAnimationIndex) PURE; // Returns the animation index + LPCSTR pName, /* Animation name */ + UINT NumScaleKeys, /* Number of scale keys */ + UINT NumRotationKeys, /* Number of rotation keys */ + UINT NumTranslationKeys, /* Number of translation keys */ + CONST D3DXKEY_VECTOR3 *pScaleKeys, /* Array of scale keys */ + CONST D3DXKEY_QUATERNION *pRotationKeys, /* Array of rotation keys */ + CONST D3DXKEY_VECTOR3 *pTranslationKeys, /* Array of translation keys */ + DWORD *pAnimationIndex) PURE; /* Returns the animation index */ - // Compression + /* Compression */ STDMETHOD(Compress)(THIS_ - DWORD Flags, // Compression flags (use D3DXCOMPRESS_STRONG for better results) - FLOAT Lossiness, // Compression loss ratio in the [0, 1] range - LPD3DXFRAME pHierarchy, // Frame hierarchy (optional) - LPD3DXBUFFER *ppCompressedData) PURE; // Returns the compressed animation set + DWORD Flags, /* Compression flags (use D3DXCOMPRESS_STRONG for better results) */ + FLOAT Lossiness, /* Compression loss ratio in the [0, 1] range */ + LPD3DXFRAME pHierarchy, /* Frame hierarchy (optional) */ + LPD3DXBUFFER *ppCompressedData) PURE; /* Returns the compressed animation set */ STDMETHOD(UnregisterAnimation)(THIS_ UINT Index) PURE; }; -//---------------------------------------------------------------------------- -// ID3DXCompressedAnimationSet: -// ---------------------------- -// This interface implements a compressed keyframed animation set. -//---------------------------------------------------------------------------- +/* + * ID3DXCompressedAnimationSet: + * ---------------------------- + * This interface implements a compressed keyframed animation set. + */ typedef interface ID3DXCompressedAnimationSet ID3DXCompressedAnimationSet; typedef interface ID3DXCompressedAnimationSet *LPD3DXCOMPRESSEDANIMATIONSET; @@ -335,54 +334,54 @@ typedef interface ID3DXCompressedAnimationSet *LPD3DXCOMPRESSEDANIMATIONSET; DECLARE_INTERFACE_(ID3DXCompressedAnimationSet, ID3DXAnimationSet) { - // ID3DXAnimationSet + /* ID3DXAnimationSet */ STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE; STDMETHOD_(ULONG, AddRef)(THIS) PURE; STDMETHOD_(ULONG, Release)(THIS) PURE; - // Name + /* Name */ STDMETHOD_(LPCSTR, GetName)(THIS) PURE; - // Period + /* Period */ STDMETHOD_(DOUBLE, GetPeriod)(THIS) PURE; - STDMETHOD_(DOUBLE, GetPeriodicPosition)(THIS_ DOUBLE Position) PURE; // Maps position into animation period + STDMETHOD_(DOUBLE, GetPeriodicPosition)(THIS_ DOUBLE Position) PURE; /* Maps position into animation period */ - // Animation names + /* Animation names */ STDMETHOD_(UINT, GetNumAnimations)(THIS) PURE; STDMETHOD(GetAnimationNameByIndex)(THIS_ UINT Index, LPCSTR *ppName) PURE; STDMETHOD(GetAnimationIndexByName)(THIS_ LPCSTR pName, UINT *pIndex) PURE; - // SRT + /* SRT */ STDMETHOD(GetSRT)(THIS_ - DOUBLE PeriodicPosition, // Position mapped to period (use GetPeriodicPosition) - UINT Animation, // Animation index - D3DXVECTOR3 *pScale, // Returns the scale - D3DXQUATERNION *pRotation, // Returns the rotation as a quaternion - D3DXVECTOR3 *pTranslation) PURE; // Returns the translation + DOUBLE PeriodicPosition, /* Position mapped to period (use GetPeriodicPosition) */ + UINT Animation, /* Animation index */ + D3DXVECTOR3 *pScale, /* Returns the scale */ + D3DXQUATERNION *pRotation, /* Returns the rotation as a quaternion */ + D3DXVECTOR3 *pTranslation) PURE; /* Returns the translation */ - // Callbacks + /* Callbacks */ STDMETHOD(GetCallback)(THIS_ - DOUBLE Position, // Position from which to find callbacks - DWORD Flags, // Callback search flags - DOUBLE *pCallbackPosition, // Returns the position of the callback - LPVOID *ppCallbackData) PURE; // Returns the callback data pointer + DOUBLE Position, /* Position from which to find callbacks */ + DWORD Flags, /* Callback search flags */ + DOUBLE *pCallbackPosition, /* Returns the position of the callback */ + LPVOID *ppCallbackData) PURE; /* Returns the callback data pointer */ - // Playback + /* Playback */ STDMETHOD_(D3DXPLAYBACK_TYPE, GetPlaybackType)(THIS) PURE; STDMETHOD_(DOUBLE, GetSourceTicksPerSecond)(THIS) PURE; - // Scale keys + /* Scale keys */ STDMETHOD(GetCompressedData)(THIS_ LPD3DXBUFFER *ppCompressedData) PURE; - // Callback keys + /* Callback keys */ STDMETHOD_(UINT, GetNumCallbackKeys)(THIS) PURE; STDMETHOD(GetCallbackKeys)(THIS_ LPD3DXKEY_CALLBACK pCallbackKeys) PURE; }; typedef enum _D3DXPRIORITY_TYPE { - D3DXPRIORITY_LOW = 0, // This track should be blended with all low priority tracks before mixed with the high priority result - D3DXPRIORITY_HIGH = 1, // This track should be blended with all high priority tracks before mixed with the low priority result + D3DXPRIORITY_LOW = 0, /* This track should be blended with all low priority tracks before mixed with the high priority result */ + D3DXPRIORITY_HIGH = 1, /* This track should be blended with all high priority tracks before mixed with the low priority result */ D3DXPRIORITY_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */ } D3DXPRIORITY_TYPE; @@ -453,18 +452,18 @@ typedef interface ID3DXAnimationController *LPD3DXANIMATIONCONTROLLER; DECLARE_INTERFACE_(ID3DXAnimationController, IUnknown) { - // IUnknown + /* IUnknown */ STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE; STDMETHOD_(ULONG, AddRef)(THIS) PURE; STDMETHOD_(ULONG, Release)(THIS) PURE; - // Max sizes + /* Max sizes */ STDMETHOD_(UINT, GetMaxNumAnimationOutputs)(THIS) PURE; STDMETHOD_(UINT, GetMaxNumAnimationSets)(THIS) PURE; STDMETHOD_(UINT, GetMaxNumTracks)(THIS) PURE; STDMETHOD_(UINT, GetMaxNumEvents)(THIS) PURE; - // Animation output registration + /* Animation output registration */ STDMETHOD(RegisterAnimationOutput)(THIS_ LPCSTR pName, D3DXMATRIX *pMatrix, @@ -472,7 +471,7 @@ DECLARE_INTERFACE_(ID3DXAnimationController, IUnknown) D3DXQUATERNION *pRotation, D3DXVECTOR3 *pTranslation) PURE; - // Animation set registration + /* Animation set registration */ STDMETHOD(RegisterAnimationSet)(THIS_ LPD3DXANIMATIONSET pAnimSet) PURE; STDMETHOD(UnregisterAnimationSet)(THIS_ LPD3DXANIMATIONSET pAnimSet) PURE; @@ -480,12 +479,12 @@ DECLARE_INTERFACE_(ID3DXAnimationController, IUnknown) STDMETHOD(GetAnimationSet)(THIS_ UINT Index, LPD3DXANIMATIONSET *ppAnimationSet) PURE; STDMETHOD(GetAnimationSetByName)(THIS_ LPCSTR szName, LPD3DXANIMATIONSET *ppAnimationSet) PURE; - // Global time + /* Global time */ STDMETHOD(AdvanceTime)(THIS_ DOUBLE TimeDelta, LPD3DXANIMATIONCALLBACKHANDLER pCallbackHandler) PURE; STDMETHOD(ResetTime)(THIS) PURE; STDMETHOD_(DOUBLE, GetTime)(THIS) PURE; - // Tracks + /* Tracks */ STDMETHOD(SetTrackAnimationSet)(THIS_ UINT Track, LPD3DXANIMATIONSET pAnimSet) PURE; STDMETHOD(GetTrackAnimationSet)(THIS_ UINT Track, LPD3DXANIMATIONSET *ppAnimSet) PURE; @@ -499,11 +498,11 @@ DECLARE_INTERFACE_(ID3DXAnimationController, IUnknown) STDMETHOD(SetTrackDesc)(THIS_ UINT Track, LPD3DXTRACK_DESC pDesc) PURE; STDMETHOD(GetTrackDesc)(THIS_ UINT Track, LPD3DXTRACK_DESC pDesc) PURE; - // Priority blending + /* Priority blending */ STDMETHOD(SetPriorityBlend)(THIS_ FLOAT BlendWeight) PURE; STDMETHOD_(FLOAT, GetPriorityBlend)(THIS) PURE; - // Event keying + /* Event keying */ STDMETHOD_(D3DXEVENTHANDLE, KeyTrackSpeed)(THIS_ UINT Track, FLOAT NewSpeed, DOUBLE StartTime, DOUBLE Duration, D3DXTRANSITION_TYPE Transition) PURE; STDMETHOD_(D3DXEVENTHANDLE, KeyTrackWeight)(THIS_ UINT Track, FLOAT NewWeight, DOUBLE StartTime, DOUBLE Duration, D3DXTRANSITION_TYPE Transition) PURE; STDMETHOD_(D3DXEVENTHANDLE, KeyTrackPosition)(THIS_ UINT Track, DOUBLE NewPosition, DOUBLE StartTime) PURE; @@ -511,13 +510,13 @@ DECLARE_INTERFACE_(ID3DXAnimationController, IUnknown) STDMETHOD_(D3DXEVENTHANDLE, KeyPriorityBlend)(THIS_ FLOAT NewBlendWeight, DOUBLE StartTime, DOUBLE Duration, D3DXTRANSITION_TYPE Transition) PURE; - // Event unkeying + /* Event unkeying */ STDMETHOD(UnkeyEvent)(THIS_ D3DXEVENTHANDLE hEvent) PURE; STDMETHOD(UnkeyAllTrackEvents)(THIS_ UINT Track) PURE; STDMETHOD(UnkeyAllPriorityBlends)(THIS) PURE; - // Event enumeration + /* Event enumeration */ STDMETHOD_(D3DXEVENTHANDLE, GetCurrentTrackEvent)(THIS_ UINT Track, D3DXEVENT_TYPE EventType) PURE; STDMETHOD_(D3DXEVENTHANDLE, GetCurrentPriorityBlend)(THIS) PURE; @@ -528,7 +527,7 @@ DECLARE_INTERFACE_(ID3DXAnimationController, IUnknown) STDMETHOD(GetEventDesc)(THIS_ D3DXEVENTHANDLE hEvent, LPD3DXEVENT_DESC pDesc) PURE; - // Cloning + /* Cloning */ STDMETHOD(CloneAnimationController)(THIS_ UINT MaxNumAnimationOutputs, UINT MaxNumAnimationSets, @@ -539,7 +538,7 @@ DECLARE_INTERFACE_(ID3DXAnimationController, IUnknown) #ifdef __cplusplus extern "C" { -#endif //__cplusplus +#endif /* __cplusplus */ HRESULT WINAPI D3DXLoadMeshHierarchyFromXA @@ -638,38 +637,38 @@ D3DXFrameRegisterNamedMatrices LPD3DXANIMATIONCONTROLLER pAnimController ); -//---------------------------------------------------------------------------- -// D3DXFrameNumNamedMatrices: -// -------------------------- -// Counts number of frames in a subtree that have non-null names -// -// Parameters: -// pFrameRoot -// Pointer to the root node of the subtree -// Return Value: -// Count of frames -// -//---------------------------------------------------------------------------- +/* + * D3DXFrameNumNamedMatrices: + * -------------------------- + * Counts number of frames in a subtree that have non-null names + * + * Parameters: + * pFrameRoot + * Pointer to the root node of the subtree + * Return Value: + * Count of frames + * + */ UINT WINAPI D3DXFrameNumNamedMatrices ( CONST D3DXFRAME *pFrameRoot ); -//---------------------------------------------------------------------------- -// D3DXFrameCalculateBoundingSphere: -// --------------------------------- -// Computes the bounding sphere of all the meshes in the frame hierarchy. -// -// Parameters: -// pFrameRoot -// Pointer to the root node -// pObjectCenter -// Returns the center of the bounding sphere -// pObjectRadius -// Returns the radius of the bounding sphere -// -//---------------------------------------------------------------------------- +/* + * D3DXFrameCalculateBoundingSphere: + * --------------------------------- + * Computes the bounding sphere of all the meshes in the frame hierarchy. + * + * Parameters: + * pFrameRoot + * Pointer to the root node + * pObjectCenter + * Returns the center of the bounding sphere + * pObjectRadius + * Returns the radius of the bounding sphere + * + */ HRESULT WINAPI D3DXFrameCalculateBoundingSphere ( @@ -679,28 +678,29 @@ D3DXFrameCalculateBoundingSphere ); -//---------------------------------------------------------------------------- -// D3DXCreateKeyframedAnimationSet: -// -------------------------------- -// This function creates a compressable keyframed animations set interface. -// -// Parameters: -// pName -// Name of the animation set -// TicksPerSecond -// Number of keyframe ticks that elapse per second -// Playback -// Playback mode of keyframe looping -// NumAnimations -// Number of SRT animations -// NumCallbackKeys -// Number of callback keys -// pCallbackKeys -// Array of callback keys -// ppAnimationSet -// Returns the animation set interface -// -//----------------------------------------------------------------------------- +/* + * D3DXCreateKeyframedAnimationSet: + * -------------------------------- + * This function creates a compressable keyframed animations set interface. + * + * Parameters: + * pName + * Name of the animation set + * TicksPerSecond + * Number of keyframe ticks that elapse per second + * Playback + * Playback mode of keyframe looping + * NumAnimations + * Number of SRT animations + * NumCallbackKeys + * Number of callback keys + * pCallbackKeys + * Array of callback keys + * ppAnimationSet + * Returns the animation set interface + * + */ + HRESULT WINAPI D3DXCreateKeyframedAnimationSet ( @@ -714,29 +714,30 @@ D3DXCreateKeyframedAnimationSet ); -//---------------------------------------------------------------------------- -// D3DXCreateCompressedAnimationSet: -// -------------------------------- -// This function creates a compressed animations set interface from -// compressed data. -// -// Parameters: -// pName -// Name of the animation set -// TicksPerSecond -// Number of keyframe ticks that elapse per second -// Playback -// Playback mode of keyframe looping -// pCompressedData -// Compressed animation SRT data -// NumCallbackKeys -// Number of callback keys -// pCallbackKeys -// Array of callback keys -// ppAnimationSet -// Returns the animation set interface -// -//----------------------------------------------------------------------------- +/* + * D3DXCreateCompressedAnimationSet: + * -------------------------------- + * This function creates a compressed animations set interface from + * compressed data. + * + * Parameters: + * pName + * Name of the animation set + * TicksPerSecond + * Number of keyframe ticks that elapse per second + * Playback + * Playback mode of keyframe looping + * pCompressedData + * Compressed animation SRT data + * NumCallbackKeys + * Number of callback keys + * pCallbackKeys + * Array of callback keys + * ppAnimationSet + * Returns the animation set interface + * + */ + HRESULT WINAPI D3DXCreateCompressedAnimationSet ( @@ -762,6 +763,6 @@ D3DXCreateAnimationController #ifdef __cplusplus } -#endif //__cplusplus +#endif /*__cplusplus */ -#endif //__D3DX9ANIM_H__ +#endif /*__D3DX9ANIM_H__ */ diff --git a/input/drivers/udev_input.c b/input/drivers/udev_input.c index ed49f07ca0..01600ecdea 100644 --- a/input/drivers/udev_input.c +++ b/input/drivers/udev_input.c @@ -1,7 +1,7 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2015 - Hans-Kristian Arntzen * Copyright (C) 2011-2017 - Daniel De Matteis - * + * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- * ation, either version 3 of the License, or (at your option) any later version. @@ -82,18 +82,17 @@ static const char *g_dev_type_str[] = typedef struct { - int16_t x, y, dlt_x, dlt_y; + /* If device is "absolute" coords will be in device specific units + and axis min value will be less than max, otherwise coords will be + relative to full viewport and min and max values will be zero. */ + int32_t x_abs, y_abs; + int32_t x_min, y_min; + int32_t x_max, y_max; + int32_t x_rel, y_rel; bool l, r, m; bool wu, wd, whu, whd; } udev_input_mouse_t; -typedef struct -{ - struct input_absinfo info_x; - struct input_absinfo info_y; - udev_input_mouse_t mouse; /* touch-pad will be presented to RA/core as mouse */ -} udev_input_touchpad_t; - struct udev_input_device { int fd; @@ -103,11 +102,7 @@ struct udev_input_device char devnode[PATH_MAX_LENGTH]; enum udev_input_dev_type type; - union - { - udev_input_mouse_t mouse; - udev_input_touchpad_t touchpad; - } state; + udev_input_mouse_t mouse; }; typedef void (*device_handle_cb)(void *data, @@ -129,6 +124,10 @@ struct udev_input #ifdef UDEV_XKB_HANDLING bool xkb_handling; #endif + + /* OS pointer coords (zeros if we don't have X11) */ + int pointer_x; + int pointer_y; }; #ifdef UDEV_XKB_HANDLING @@ -216,10 +215,7 @@ static udev_input_mouse_t *udev_get_mouse(struct udev_input *udev, unsigned port if (mouse_index == settings->uints.input_mouse_index[port]) { - if (udev->devices[i]->type == UDEV_INPUT_MOUSE) - mouse = &udev->devices[i]->state.mouse; - else - mouse = &udev->devices[i]->state.touchpad.mouse; + mouse = &udev->devices[i]->mouse; break; } @@ -229,54 +225,166 @@ static udev_input_mouse_t *udev_get_mouse(struct udev_input *udev, unsigned port return mouse; } -static void udev_handle_touchpad(void *data, - const struct input_event *event, udev_input_device_t *dev) +static void udev_mouse_set_x(udev_input_mouse_t *mouse, int32_t x, bool abs) { - int16_t pos; - unsigned width = 0; - unsigned height = 0; - udev_input_touchpad_t *touchpad = &dev->state.touchpad; - udev_input_mouse_t *mouse = &dev->state.touchpad.mouse; + video_viewport_t vp; - switch (event->type) + if (abs) { - case EV_ABS: - video_driver_get_size(&width, &height); - switch (event->code) - { - case ABS_X: - pos = (float)(event->value - touchpad->info_x.minimum) / - (touchpad->info_x.maximum - touchpad->info_x.minimum) * width; - mouse->dlt_x += pos - mouse->x; - mouse->x = pos; - break; - case ABS_Y: - pos = (float)(event->value - touchpad->info_y.minimum) / - (touchpad->info_y.maximum - touchpad->info_y.minimum) * height; - mouse->dlt_y += pos - mouse->y; - mouse->y = pos; - } - break; - - case EV_KEY: - switch (event->code) - { - case BTN_LEFT: - mouse->l = event->value; - break; - case BTN_MIDDLE: - mouse->m = event->value; - break; - case BTN_RIGHT: - mouse->r = event->value; - } + mouse->x_rel += x - mouse->x_abs; + mouse->x_abs = x; } + else + { + mouse->x_rel += x; + if (video_driver_get_viewport_info(&vp)) + { + mouse->x_abs += x; + + if (mouse->x_abs < vp.x) + mouse->x_abs = vp.x; + else if (mouse->x_abs >= vp.x + vp.full_width) + mouse->x_abs = vp.x + vp.full_width - 1; + } + } +} + +static int16_t udev_mouse_get_x(const udev_input_mouse_t *mouse) +{ + video_viewport_t vp; + double src_width; + double x; + + if (!video_driver_get_viewport_info(&vp)) + return 0; + + if (mouse->x_min < mouse->x_max) /* mouse coords are absolute */ + src_width = mouse->x_max - mouse->x_min + 1; + else + src_width = vp.full_width; + + x = (double)vp.width / src_width * mouse->x_rel; + + return x + (x < 0 ? -0.5 : 0.5); +} + +static void udev_mouse_set_y(udev_input_mouse_t *mouse, int32_t y, bool abs) +{ + video_viewport_t vp; + + if (abs) + { + mouse->y_rel += y - mouse->y_abs; + mouse->y_abs = y; + } + else + { + mouse->y_rel += y; + if (video_driver_get_viewport_info(&vp)) + { + mouse->y_abs += y; + + if (mouse->y_abs < vp.y) + mouse->y_abs = vp.y; + else if (mouse->y_abs >= vp.y + vp.full_height) + mouse->y_abs = vp.y + vp.full_height - 1; + } + } +} + +static int16_t udev_mouse_get_y(const udev_input_mouse_t *mouse) +{ + video_viewport_t vp; + double src_height; + double y; + + if (!video_driver_get_viewport_info(&vp)) + return 0; + + if (mouse->y_min < mouse->y_max) /* mouse coords are absolute */ + src_height = mouse->y_max - mouse->y_min + 1; + else + src_height = vp.full_height; + + y = (double)vp.height / src_height * mouse->y_rel; + + return y + (y < 0 ? -0.5 : 0.5); +} + +static int16_t udev_mouse_get_pointer_x(const udev_input_mouse_t *mouse, bool screen) +{ + video_viewport_t vp; + double src_min; + double src_width; + int32_t x; + + if (!video_driver_get_viewport_info(&vp)) + return 0; + + if (mouse->x_min < mouse->x_max) /* mouse coords are absolute */ + { + src_min = mouse->x_min; + src_width = mouse->x_max - mouse->x_min + 1; + } + else /* mouse coords are viewport relative */ + { + src_min = vp.x; + if (screen) + src_width = vp.full_width; + else + src_width = vp.width; + } + + x = -32767.0 + 65535.0 / src_width * (mouse->x_abs - src_min); + x += (x < 0 ? -0.5 : 0.5); + + if (x < -0x7fff) + x = -0x7fff; + else if(x > 0x7fff) + x = 0x7fff; + + return x; +} + +static int16_t udev_mouse_get_pointer_y(const udev_input_mouse_t *mouse, bool screen) +{ + video_viewport_t vp; + double src_min; + double src_height; + int32_t y; + + if (!video_driver_get_viewport_info(&vp)) + return 0; + + if (mouse->y_min < mouse->y_max) /* mouse coords are absolute */ + { + src_min = mouse->y_min; + src_height = mouse->y_max - mouse->y_min + 1; + } + else /* mouse coords are viewport relative */ + { + src_min = vp.y; + if (screen) + src_height = vp.full_height; + else + src_height = vp.height; + } + + y = -32767.0 + 65535.0 / src_height * (mouse->y_abs - src_min); + y += (y < 0 ? -0.5 : 0.5); + + if (y < -0x7fff) + y = -0x7fff; + else if(y > 0x7fff) + y = 0x7fff; + + return y; } static void udev_handle_mouse(void *data, const struct input_event *event, udev_input_device_t *dev) { - udev_input_mouse_t *mouse = &dev->state.mouse; + udev_input_mouse_t *mouse = &dev->mouse; switch (event->type) { @@ -303,10 +411,10 @@ static void udev_handle_mouse(void *data, switch (event->code) { case REL_X: - mouse->dlt_x += event->value; + udev_mouse_set_x(mouse, event->value, false); break; case REL_Y: - mouse->dlt_y += event->value; + udev_mouse_set_y(mouse, event->value, false); break; case REL_WHEEL: if (event->value == 1) @@ -321,6 +429,19 @@ static void udev_handle_mouse(void *data, mouse->whd = 1; break; } + break; + + case EV_ABS: + switch (event->code) + { + case ABS_X: + udev_mouse_set_x(mouse, event->value, true); + break; + case ABS_Y: + udev_mouse_set_y(mouse, event->value, true); + break; + } + break; } } @@ -330,6 +451,7 @@ static bool udev_input_add_device(udev_input_t *udev, int fd; struct stat st; struct epoll_event event; + struct input_absinfo absinfo; udev_input_device_t **tmp; udev_input_device_t *device = NULL; @@ -354,10 +476,38 @@ static bool udev_input_add_device(udev_input_t *udev, strlcpy(device->devnode, devnode, sizeof(device->devnode)); /* Touchpads report in absolute coords. */ - if (type == UDEV_INPUT_TOUCHPAD && - (ioctl(fd, EVIOCGABS(ABS_X), &device->state.touchpad.info_x) < 0 || - ioctl(fd, EVIOCGABS(ABS_Y), &device->state.touchpad.info_y) < 0)) - goto error; + if (type == UDEV_INPUT_TOUCHPAD) + { + if (ioctl(fd, EVIOCGABS(ABS_X), &absinfo) < 0 || + absinfo.minimum >= absinfo.maximum) + goto error; + + device->mouse.x_min = absinfo.minimum; + device->mouse.x_max = absinfo.maximum; + + if (ioctl(fd, EVIOCGABS(ABS_Y), &absinfo) < 0 || + absinfo.minimum >= absinfo.maximum) + goto error; + + device->mouse.y_min = absinfo.minimum; + device->mouse.y_max = absinfo.maximum; + } + /* UDEV_INPUT_MOUSE may report in absolute coords too */ + else if (type == UDEV_INPUT_MOUSE && ioctl(fd, EVIOCGABS(ABS_X), &absinfo) >= 0) + { + if (absinfo.minimum >= absinfo.maximum) + goto error; + + device->mouse.x_min = absinfo.minimum; + device->mouse.x_max = absinfo.maximum; + + if (ioctl(fd, EVIOCGABS(ABS_Y), &absinfo) < 0 || + absinfo.minimum >= absinfo.maximum) + goto error; + + device->mouse.y_min = absinfo.minimum; + device->mouse.y_max = absinfo.maximum; + } tmp = ( udev_input_device_t**)realloc(udev->devices, (udev->num_devices + 1) * sizeof(*udev->devices)); @@ -440,7 +590,7 @@ static void udev_input_handle_hotplug(udev_input_t *udev) else if (val_touchpad && string_is_equal_fast(val_touchpad, "1", 1) && devnode) { dev_type = UDEV_INPUT_TOUCHPAD; - cb = udev_handle_touchpad; + cb = udev_handle_mouse; } else goto end; @@ -477,11 +627,11 @@ static void udev_input_get_pointer_position(int *x, int *y) static bool udev_input_poll_hotplug_available(struct udev_monitor *dev) { - struct pollfd fds; + struct pollfd fds; - fds.fd = udev_monitor_get_fd(dev); - fds.events = POLLIN; - fds.revents = 0; + fds.fd = udev_monitor_get_fd(dev); + fds.events = POLLIN; + fds.revents = 0; return (poll(&fds, 1, 0) == 1) && (fds.revents & POLLIN); } @@ -491,30 +641,22 @@ static void udev_input_poll(void *data) int i, ret; struct epoll_event events[32]; udev_input_mouse_t *mouse = NULL; - int x = 0; - int y = 0; udev_input_t *udev = (udev_input_t*)data; #ifdef HAVE_X11 if (video_driver_display_type_get() == RARCH_DISPLAY_X11) - udev_input_get_pointer_position(&x, &y); + udev_input_get_pointer_position(&udev->pointer_x, &udev->pointer_y); #endif for (i = 0; i < udev->num_devices; ++i) { - if (udev->devices[i]->type == UDEV_INPUT_MOUSE) - { - mouse = &udev->devices[i]->state.mouse; - mouse->x = x; - mouse->y = y; - } - else if (udev->devices[i]->type == UDEV_INPUT_TOUCHPAD) - mouse = &udev->devices[i]->state.touchpad.mouse; - else + if (udev->devices[i]->type == UDEV_INPUT_KEYBOARD) continue; - mouse->dlt_x = 0; - mouse->dlt_y = 0; + mouse = &udev->devices[i]->mouse; + + mouse->x_rel = 0; + mouse->y_rel = 0; mouse->wu = false; mouse->wd = false; mouse->whu = false; @@ -548,18 +690,22 @@ static void udev_input_poll(void *data) udev->joypad->poll(); } -static bool udev_pointer_is_off_window(udev_input_mouse_t *mouse) +static bool udev_pointer_is_off_window(const udev_input_t *udev) { +#ifdef HAVE_X11 struct video_viewport view; bool r = video_driver_get_viewport_info(&view); if (r) - r = mouse->x < view.x || - mouse->x >= view.x + view.width || - mouse->y < view.y || - mouse->y >= view.y + view.height; + r = udev->pointer_x < view.x || + udev->pointer_x >= view.x + view.width || + udev->pointer_y < view.y || + udev->pointer_y >= view.y + view.height; return r; +#else + return false; +#endif } static int16_t udev_mouse_state(udev_input_t *udev, @@ -571,15 +717,15 @@ static int16_t udev_mouse_state(udev_input_t *udev, return 0; if (id != RETRO_DEVICE_ID_MOUSE_X && id != RETRO_DEVICE_ID_MOUSE_Y && - udev_pointer_is_off_window(mouse)) + udev_pointer_is_off_window(udev)) return 0; switch (id) { case RETRO_DEVICE_ID_MOUSE_X: - return screen ? mouse->x : mouse->dlt_x; + return screen ? udev->pointer_x : udev_mouse_get_x(mouse); case RETRO_DEVICE_ID_MOUSE_Y: - return screen ? mouse->y : mouse->dlt_y; + return screen ? udev->pointer_y : udev_mouse_get_y(mouse); case RETRO_DEVICE_ID_MOUSE_LEFT: return mouse->l; case RETRO_DEVICE_ID_MOUSE_RIGHT: @@ -610,9 +756,9 @@ static int16_t udev_lightgun_state(udev_input_t *udev, switch (id) { case RETRO_DEVICE_ID_LIGHTGUN_X: - return mouse->dlt_x; + return udev_mouse_get_x(mouse); case RETRO_DEVICE_ID_LIGHTGUN_Y: - return mouse->dlt_y; + return udev_mouse_get_y(mouse); case RETRO_DEVICE_ID_LIGHTGUN_TRIGGER: return mouse->l; case RETRO_DEVICE_ID_LIGHTGUN_CURSOR: @@ -638,11 +784,11 @@ static int16_t udev_analog_pressed(const struct retro_keybind *binds, input_conv_analog_id_to_bind_id(idx, id, &id_minus, &id_plus); - if ( binds[id_minus].valid + if ( binds[id_minus].valid && BIT_GET(udev_key_state, rarch_keysym_lut[binds[id_minus].key])) pressed_minus = -0x7fff; - if ( binds[id_plus].valid + if ( binds[id_plus].valid && BIT_GET(udev_key_state, rarch_keysym_lut[binds[id_plus].key])) pressed_plus = 0x7fff; @@ -653,45 +799,17 @@ static int16_t udev_analog_pressed(const struct retro_keybind *binds, static int16_t udev_pointer_state(udev_input_t *udev, unsigned port, unsigned id, bool screen) { - struct video_viewport vp; - bool inside = false; - int16_t res_x = 0; - int16_t res_y = 0; - int16_t res_screen_x = 0; - int16_t res_screen_y = 0; - udev_input_mouse_t *mouse = udev_get_mouse(udev, port); - - vp.x = 0; - vp.y = 0; - vp.width = 0; - vp.height = 0; - vp.full_width = 0; - vp.full_height = 0; + udev_input_mouse_t *mouse = udev_get_mouse(udev, port); if (!mouse) return 0; - if (!(video_driver_translate_coord_viewport_wrap(&vp, - mouse->x, mouse->y, &res_x, &res_y, &res_screen_x, &res_screen_y))) - return 0; - - if (screen) - { - res_x = res_screen_x; - res_y = res_screen_y; - } - - inside = (res_x >= -0x7fff) && (res_y >= -0x7fff); - - if (!inside) - return 0; - switch (id) { case RETRO_DEVICE_ID_POINTER_X: - return res_x; + return udev_mouse_get_pointer_x(mouse, screen); case RETRO_DEVICE_ID_POINTER_Y: - return res_y; + return udev_mouse_get_pointer_y(mouse, screen); case RETRO_DEVICE_ID_POINTER_PRESSED: return mouse->l; } @@ -785,6 +903,7 @@ static bool open_devices(udev_input_t *udev, struct udev_list_entry *devs = NULL; struct udev_list_entry *item = NULL; struct udev_enumerate *enumerate = udev_enumerate_new(udev->udev); + int device_index = 0; if (!enumerate) return false; @@ -808,11 +927,13 @@ static bool open_devices(udev_input_t *udev, if (fd != -1) { - RARCH_LOG("[udev] Adding device %s as type %s.\n", - devnode, type_str); if (!udev_input_add_device(udev, type, devnode, cb)) RARCH_ERR("[udev] Failed to open device: %s (%s).\n", devnode, strerror(errno)); + else + RARCH_LOG("[udev]: %s #%d (%s).\n", + type == UDEV_INPUT_KEYBOARD ? "Keyboard" : "Mouse", + device_index++, devnode); close(fd); } } @@ -878,13 +999,13 @@ static void *udev_input_init(const char *joypad_driver) goto error; } - if (!open_devices(udev, UDEV_INPUT_TOUCHPAD, udev_handle_touchpad)) + if (!open_devices(udev, UDEV_INPUT_TOUCHPAD, udev_handle_mouse)) { RARCH_ERR("Failed to open touchpads.\n"); goto error; } - /* If using KMS and we forgot this, + /* If using KMS and we forgot this, * we could lock ourselves out completely. */ if (!udev->num_devices) RARCH_WARN("[udev]: Couldn't open any keyboard, mouse or touchpad. Are permissions set correctly for /dev/input/event*?\n"); diff --git a/input/drivers/winraw_input.c b/input/drivers/winraw_input.c index 6ea23df806..bb44a0b92e 100644 --- a/input/drivers/winraw_input.c +++ b/input/drivers/winraw_input.c @@ -323,6 +323,49 @@ static void winraw_init_mouse_xy_mapping() } } +static int16_t winraw_lightgun_state(winraw_input_t *wr, + unsigned port, unsigned id) +{ + unsigned i; + settings_t *settings = config_get_ptr(); + winraw_mouse_t *mouse = NULL; + + if (port >= MAX_USERS) + return 0; + + for (i = 0; i < g_mouse_cnt; ++i) + { + if (i == settings->uints.input_mouse_index[port]) + { + mouse = &wr->mice[i]; + break; + } + } + + if (!mouse) + return 0; + + switch (id) + { + case RETRO_DEVICE_ID_LIGHTGUN_X: + return mouse->dlt_x; + case RETRO_DEVICE_ID_LIGHTGUN_Y: + return mouse->dlt_y; + case RETRO_DEVICE_ID_LIGHTGUN_TRIGGER: + return mouse->btn_l ? 1 : 0; + case RETRO_DEVICE_ID_LIGHTGUN_CURSOR: + return mouse->btn_m ? 1 : 0; + case RETRO_DEVICE_ID_LIGHTGUN_TURBO: + return mouse->btn_r ? 1 : 0; + case RETRO_DEVICE_ID_LIGHTGUN_START: + return (mouse->btn_m && mouse->btn_r) ? 1 : 0; + case RETRO_DEVICE_ID_LIGHTGUN_PAUSE: + return mouse->btn_m && mouse->btn_l ? 1 : 0; + } + + return 0; +} + static void winraw_update_mouse_state(winraw_mouse_t *mouse, RAWMOUSE *state) { POINT crs_pos; @@ -555,6 +598,9 @@ static int16_t winraw_input_state(void *d, if (binds[port]) return input_joypad_analog(wr->joypad, joypad_info, port, index, id, binds[port]); + break; + case RETRO_DEVICE_LIGHTGUN: + return winraw_lightgun_state(wr, port, id); } return 0; @@ -587,7 +633,8 @@ static uint64_t winraw_get_capabilities(void *u) return (1 << RETRO_DEVICE_KEYBOARD) | (1 << RETRO_DEVICE_MOUSE) | (1 << RETRO_DEVICE_JOYPAD) | - (1 << RETRO_DEVICE_ANALOG); + (1 << RETRO_DEVICE_ANALOG) | + (1 << RETRO_DEVICE_LIGHTGUN); } static void winraw_grab_mouse(void *d, bool grab) diff --git a/intl/msg_hash_chs.h b/intl/msg_hash_chs.h index 35881b5792..a11bfbe4c6 100644 --- a/intl/msg_hash_chs.h +++ b/intl/msg_hash_chs.h @@ -3063,6 +3063,34 @@ MSG_HASH(MENU_ENUM_SUBLABEL_PLAYLIST_ENTRY_RENAME, "Allow the user to rename entries in collections.") MSG_HASH(MENU_ENUM_LABEL_VALUE_PLAYLIST_ENTRY_RENAME, "Allow to rename entries") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_LOAD_CORE, + "Show Load Core") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_LOAD_CORE, + "Show/hide the 'Load Core' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_LOAD_CONTENT, + "Show Load Content") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_LOAD_CONTENT, + "Show/hide the 'Load Content' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_INFORMATION, + "Show Information") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_INFORMATION, + "Show/hide the 'Information' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_CONFIGURATIONS, + "Show Configurations") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_CONFIGURATIONS, + "Show/hide the 'Configurations' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_HELP, + "Show Help") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_HELP, + "Show/hide the 'Help' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_QUIT_RETROARCH, + "Show Quit RetroArch") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_QUIT_RETROARCH, + "Show/hide the 'Quit RetroArch' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_REBOOT, + "Show Reboot") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_REBOOT, + "Show/hide the 'Reboot' option.") MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_VIEWS_SETTINGS, "Quick Menu") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_VIEWS_SETTINGS, diff --git a/intl/msg_hash_cht.h b/intl/msg_hash_cht.h index c207a42888..f042968c41 100644 --- a/intl/msg_hash_cht.h +++ b/intl/msg_hash_cht.h @@ -3063,6 +3063,34 @@ MSG_HASH(MENU_ENUM_SUBLABEL_PLAYLIST_ENTRY_RENAME, "Allow the user to rename entries in collections.") MSG_HASH(MENU_ENUM_LABEL_VALUE_PLAYLIST_ENTRY_RENAME, "Allow to rename entries") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_LOAD_CORE, + "Show Load Core") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_LOAD_CORE, + "Show/hide the 'Load Core' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_LOAD_CONTENT, + "Show Load Content") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_LOAD_CONTENT, + "Show/hide the 'Load Content' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_INFORMATION, + "Show Information") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_INFORMATION, + "Show/hide the 'Information' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_CONFIGURATIONS, + "Show Configurations") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_CONFIGURATIONS, + "Show/hide the 'Configurations' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_HELP, + "Show Help") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_HELP, + "Show/hide the 'Help' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_QUIT_RETROARCH, + "Show Quit RetroArch") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_QUIT_RETROARCH, + "Show/hide the 'Quit RetroArch' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_REBOOT, + "Show Reboot") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_REBOOT, + "Show/hide the 'Reboot' option.") MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_VIEWS_SETTINGS, "Quick Menu") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_VIEWS_SETTINGS, diff --git a/intl/msg_hash_de.h b/intl/msg_hash_de.h index 5632ce4740..bd8aac4ed8 100644 --- a/intl/msg_hash_de.h +++ b/intl/msg_hash_de.h @@ -3057,6 +3057,34 @@ MSG_HASH(MENU_ENUM_SUBLABEL_PLAYLIST_ENTRY_RENAME, "Allow the user to rename entries in collections.") MSG_HASH(MENU_ENUM_LABEL_VALUE_PLAYLIST_ENTRY_RENAME, "Allow to rename entries") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_LOAD_CORE, + "Show Load Core") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_LOAD_CORE, + "Show/hide the 'Load Core' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_LOAD_CONTENT, + "Show Load Content") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_LOAD_CONTENT, + "Show/hide the 'Load Content' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_INFORMATION, + "Show Information") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_INFORMATION, + "Show/hide the 'Information' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_CONFIGURATIONS, + "Show Configurations") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_CONFIGURATIONS, + "Show/hide the 'Configurations' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_HELP, + "Show Help") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_HELP, + "Show/hide the 'Help' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_QUIT_RETROARCH, + "Show Quit RetroArch") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_QUIT_RETROARCH, + "Show/hide the 'Quit RetroArch' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_REBOOT, + "Show Reboot") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_REBOOT, + "Show/hide the 'Reboot' option.") MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_VIEWS_SETTINGS, "Quick Menu") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_VIEWS_SETTINGS, diff --git a/intl/msg_hash_eo.h b/intl/msg_hash_eo.h index 0d789bb51b..c4eaa936f6 100644 --- a/intl/msg_hash_eo.h +++ b/intl/msg_hash_eo.h @@ -2926,6 +2926,34 @@ MSG_HASH(MENU_ENUM_SUBLABEL_PLAYLIST_ENTRY_RENAME, "Allow the user to rename entries in collections.") MSG_HASH(MENU_ENUM_LABEL_VALUE_PLAYLIST_ENTRY_RENAME, "Allow to rename entries") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_LOAD_CORE, + "Show Load Core") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_LOAD_CORE, + "Show/hide the 'Load Core' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_LOAD_CONTENT, + "Show Load Content") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_LOAD_CONTENT, + "Show/hide the 'Load Content' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_INFORMATION, + "Show Information") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_INFORMATION, + "Show/hide the 'Information' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_CONFIGURATIONS, + "Show Configurations") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_CONFIGURATIONS, + "Show/hide the 'Configurations' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_HELP, + "Show Help") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_HELP, + "Show/hide the 'Help' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_QUIT_RETROARCH, + "Show Quit RetroArch") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_QUIT_RETROARCH, + "Show/hide the 'Quit RetroArch' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_REBOOT, + "Show Reboot") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_REBOOT, + "Show/hide the 'Reboot' option.") MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_VIEWS_SETTINGS, "Quick Menu") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_VIEWS_SETTINGS, diff --git a/intl/msg_hash_fr.h b/intl/msg_hash_fr.h index dcbfbb8b74..51911b4f8b 100644 --- a/intl/msg_hash_fr.h +++ b/intl/msg_hash_fr.h @@ -3095,6 +3095,34 @@ MSG_HASH(MENU_ENUM_SUBLABEL_PLAYLIST_ENTRY_RENAME, "Allow the user to rename entries in collections.") MSG_HASH(MENU_ENUM_LABEL_VALUE_PLAYLIST_ENTRY_RENAME, "Allow to rename entries") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_LOAD_CORE, + "Show Load Core") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_LOAD_CORE, + "Show/hide the 'Load Core' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_LOAD_CONTENT, + "Show Load Content") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_LOAD_CONTENT, + "Show/hide the 'Load Content' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_INFORMATION, + "Show Information") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_INFORMATION, + "Show/hide the 'Information' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_CONFIGURATIONS, + "Show Configurations") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_CONFIGURATIONS, + "Show/hide the 'Configurations' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_HELP, + "Show Help") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_HELP, + "Show/hide the 'Help' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_QUIT_RETROARCH, + "Show Quit RetroArch") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_QUIT_RETROARCH, + "Show/hide the 'Quit RetroArch' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_REBOOT, + "Show Reboot") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_REBOOT, + "Show/hide the 'Reboot' option.") MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_VIEWS_SETTINGS, "Quick Menu") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_VIEWS_SETTINGS, diff --git a/intl/msg_hash_it.h b/intl/msg_hash_it.h index 65a1718d6f..b5659fff47 100644 --- a/intl/msg_hash_it.h +++ b/intl/msg_hash_it.h @@ -3149,6 +3149,34 @@ MSG_HASH(MENU_ENUM_SUBLABEL_PLAYLIST_ENTRY_RENAME, "Allow the user to rename entries in collections.") MSG_HASH(MENU_ENUM_LABEL_VALUE_PLAYLIST_ENTRY_RENAME, "Allow to rename entries") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_LOAD_CORE, + "Show Load Core") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_LOAD_CORE, + "Show/hide the 'Load Core' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_LOAD_CONTENT, + "Show Load Content") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_LOAD_CONTENT, + "Show/hide the 'Load Content' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_INFORMATION, + "Show Information") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_INFORMATION, + "Show/hide the 'Information' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_CONFIGURATIONS, + "Show Configurations") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_CONFIGURATIONS, + "Show/hide the 'Configurations' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_HELP, + "Show Help") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_HELP, + "Show/hide the 'Help' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_QUIT_RETROARCH, + "Show Quit RetroArch") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_QUIT_RETROARCH, + "Show/hide the 'Quit RetroArch' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_REBOOT, + "Show Reboot") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_REBOOT, + "Show/hide the 'Reboot' option.") MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_VIEWS_SETTINGS, "Quick Menu") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_VIEWS_SETTINGS, diff --git a/intl/msg_hash_ja.h b/intl/msg_hash_ja.h index 86a5555108..3b670dfa86 100644 --- a/intl/msg_hash_ja.h +++ b/intl/msg_hash_ja.h @@ -3065,6 +3065,34 @@ MSG_HASH(MENU_ENUM_SUBLABEL_PLAYLIST_ENTRY_RENAME, "Allow the user to rename entries in collections.") MSG_HASH(MENU_ENUM_LABEL_VALUE_PLAYLIST_ENTRY_RENAME, "エントリーの名前変更を許す") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_LOAD_CORE, + "Show Load Core") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_LOAD_CORE, + "Show/hide the 'Load Core' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_LOAD_CONTENT, + "Show Load Content") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_LOAD_CONTENT, + "Show/hide the 'Load Content' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_INFORMATION, + "Show Information") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_INFORMATION, + "Show/hide the 'Information' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_CONFIGURATIONS, + "Show Configurations") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_CONFIGURATIONS, + "Show/hide the 'Configurations' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_HELP, + "Show Help") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_HELP, + "Show/hide the 'Help' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_QUIT_RETROARCH, + "Show Quit RetroArch") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_QUIT_RETROARCH, + "Show/hide the 'Quit RetroArch' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_REBOOT, + "Show Reboot") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_REBOOT, + "Show/hide the 'Reboot' option.") MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_VIEWS_SETTINGS, "Quick Menu") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_VIEWS_SETTINGS, diff --git a/intl/msg_hash_ko.h b/intl/msg_hash_ko.h index 38eb32f9ae..57b8fbeadd 100644 --- a/intl/msg_hash_ko.h +++ b/intl/msg_hash_ko.h @@ -3058,6 +3058,34 @@ MSG_HASH(MENU_ENUM_SUBLABEL_PLAYLIST_ENTRY_RENAME, "Allow the user to rename entries in collections.") MSG_HASH(MENU_ENUM_LABEL_VALUE_PLAYLIST_ENTRY_RENAME, "Allow to rename entries") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_LOAD_CORE, + "Show Load Core") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_LOAD_CORE, + "Show/hide the 'Load Core' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_LOAD_CONTENT, + "Show Load Content") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_LOAD_CONTENT, + "Show/hide the 'Load Content' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_INFORMATION, + "Show Information") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_INFORMATION, + "Show/hide the 'Information' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_CONFIGURATIONS, + "Show Configurations") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_CONFIGURATIONS, + "Show/hide the 'Configurations' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_HELP, + "Show Help") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_HELP, + "Show/hide the 'Help' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_QUIT_RETROARCH, + "Show Quit RetroArch") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_QUIT_RETROARCH, + "Show/hide the 'Quit RetroArch' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_REBOOT, + "Show Reboot") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_REBOOT, + "Show/hide the 'Reboot' option.") MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_VIEWS_SETTINGS, "Quick Menu") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_VIEWS_SETTINGS, diff --git a/intl/msg_hash_lbl.h b/intl/msg_hash_lbl.h index af5b79e5ec..e9598cb327 100644 --- a/intl/msg_hash_lbl.h +++ b/intl/msg_hash_lbl.h @@ -1307,6 +1307,20 @@ MSG_HASH(MENU_ENUM_LABEL_MATERIALUI_ICONS_ENABLE, "materialui_icons_enable") MSG_HASH(MENU_ENUM_LABEL_RENAME_ENTRY, "rename_entry") +MSG_HASH(MENU_ENUM_LABEL_MENU_SHOW_LOAD_CORE, + "menu_show_load_core") +MSG_HASH(MENU_ENUM_LABEL_MENU_SHOW_LOAD_CONTENT, + "menu_show_load_content") +MSG_HASH(MENU_ENUM_LABEL_MENU_SHOW_INFORMATION, + "menu_show_information") +MSG_HASH(MENU_ENUM_LABEL_MENU_SHOW_CONFIGURATIONS, + "menu_show_configurations") +MSG_HASH(MENU_ENUM_LABEL_MENU_SHOW_HELP, + "menu_show_help") +MSG_HASH(MENU_ENUM_LABEL_MENU_SHOW_QUIT_RETROARCH, + "menu_show_quit_retroarch") +MSG_HASH(MENU_ENUM_LABEL_MENU_SHOW_REBOOT, + "menu_show_reboot") MSG_HASH(MENU_ENUM_LABEL_QUICK_MENU_SHOW_TAKE_SCREENSHOT, "quick_menu_show_take_screenshot") MSG_HASH(MENU_ENUM_LABEL_QUICK_MENU_SHOW_SAVE_LOAD_STATE, diff --git a/intl/msg_hash_nl.h b/intl/msg_hash_nl.h index fd762f71d4..ebf00c87e6 100644 --- a/intl/msg_hash_nl.h +++ b/intl/msg_hash_nl.h @@ -2926,6 +2926,34 @@ MSG_HASH(MENU_ENUM_SUBLABEL_PLAYLIST_ENTRY_RENAME, "Allow the user to rename entries in collections.") MSG_HASH(MENU_ENUM_LABEL_VALUE_PLAYLIST_ENTRY_RENAME, "Allow to rename entries") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_LOAD_CORE, + "Show Load Core") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_LOAD_CORE, + "Show/hide the 'Load Core' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_LOAD_CONTENT, + "Show Load Content") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_LOAD_CONTENT, + "Show/hide the 'Load Content' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_INFORMATION, + "Show Information") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_INFORMATION, + "Show/hide the 'Information' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_CONFIGURATIONS, + "Show Configurations") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_CONFIGURATIONS, + "Show/hide the 'Configurations' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_HELP, + "Show Help") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_HELP, + "Show/hide the 'Help' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_QUIT_RETROARCH, + "Show Quit RetroArch") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_QUIT_RETROARCH, + "Show/hide the 'Quit RetroArch' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_REBOOT, + "Show Reboot") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_REBOOT, + "Show/hide the 'Reboot' option.") MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_VIEWS_SETTINGS, "Quick Menu") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_VIEWS_SETTINGS, diff --git a/intl/msg_hash_pt_br.h b/intl/msg_hash_pt_br.h index 984363b0a3..54e8d56f93 100644 --- a/intl/msg_hash_pt_br.h +++ b/intl/msg_hash_pt_br.h @@ -3988,6 +3988,48 @@ MSG_HASH(MENU_ENUM_SUBLABEL_PLAYLIST_ENTRY_RENAME, MSG_HASH(MENU_ENUM_LABEL_VALUE_PLAYLIST_ENTRY_RENAME, "Allow to rename entries" ) +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_LOAD_CORE, + "Show Load Core" + ) +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_LOAD_CORE, + "Show/hide the 'Load Core' option." + ) +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_LOAD_CONTENT, + "Show Load Content" + ) +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_LOAD_CONTENT, + "Show/hide the 'Load Content' option." + ) +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_INFORMATION, + "Show Information" + ) +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_INFORMATION, + "Show/hide the 'Information' option." + ) +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_CONFIGURATIONS, + "Show Configurations" + ) +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_CONFIGURATIONS, + "Show/hide the 'Configurations' option." + ) +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_HELP, + "Show Help" + ) +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_HELP, + "Show/hide the 'Help' option." + ) +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_QUIT_RETROARCH, + "Show Quit RetroArch" + ) +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_QUIT_RETROARCH, + "Show/hide the 'Quit RetroArch' option." + ) +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_REBOOT, + "Show Reboot" + ) +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_REBOOT, + "Show/hide the 'Reboot' option." + ) MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_VIEWS_SETTINGS, "Quick Menu" ) @@ -4059,4 +4101,4 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_INFORMATION, ) MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_INFORMATION, "Show/hide the 'Information' option." - ) + \ No newline at end of file diff --git a/intl/msg_hash_pt_pt.h b/intl/msg_hash_pt_pt.h index f20ea34bae..b49979d710 100644 --- a/intl/msg_hash_pt_pt.h +++ b/intl/msg_hash_pt_pt.h @@ -3033,6 +3033,34 @@ MSG_HASH(MENU_ENUM_SUBLABEL_PLAYLIST_ENTRY_RENAME, "Allow the user to rename entries in collections.") MSG_HASH(MENU_ENUM_LABEL_VALUE_PLAYLIST_ENTRY_RENAME, "Allow to rename entries") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_LOAD_CORE, + "Show Load Core") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_LOAD_CORE, + "Show/hide the 'Load Core' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_LOAD_CONTENT, + "Show Load Content") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_LOAD_CONTENT, + "Show/hide the 'Load Content' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_INFORMATION, + "Show Information") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_INFORMATION, + "Show/hide the 'Information' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_CONFIGURATIONS, + "Show Configurations") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_CONFIGURATIONS, + "Show/hide the 'Configurations' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_HELP, + "Show Help") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_HELP, + "Show/hide the 'Help' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_QUIT_RETROARCH, + "Show Quit RetroArch") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_QUIT_RETROARCH, + "Show/hide the 'Quit RetroArch' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_REBOOT, + "Show Reboot") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_REBOOT, + "Show/hide the 'Reboot' option.") MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_VIEWS_SETTINGS, "Quick Menu") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_VIEWS_SETTINGS, diff --git a/intl/msg_hash_ru.h b/intl/msg_hash_ru.h index b58c300db3..3b4bcecc33 100644 --- a/intl/msg_hash_ru.h +++ b/intl/msg_hash_ru.h @@ -3116,6 +3116,34 @@ MSG_HASH(MENU_ENUM_SUBLABEL_PLAYLIST_ENTRY_RENAME, "Allow the user to rename entries in collections.") MSG_HASH(MENU_ENUM_LABEL_VALUE_PLAYLIST_ENTRY_RENAME, "Allow to rename entries") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_LOAD_CORE, + "Show Load Core") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_LOAD_CORE, + "Show/hide the 'Load Core' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_LOAD_CONTENT, + "Show Load Content") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_LOAD_CONTENT, + "Show/hide the 'Load Content' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_INFORMATION, + "Show Information") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_INFORMATION, + "Show/hide the 'Information' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_CONFIGURATIONS, + "Show Configurations") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_CONFIGURATIONS, + "Show/hide the 'Configurations' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_HELP, + "Show Help") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_HELP, + "Show/hide the 'Help' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_QUIT_RETROARCH, + "Show Quit RetroArch") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_QUIT_RETROARCH, + "Show/hide the 'Quit RetroArch' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_REBOOT, + "Show Reboot") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_REBOOT, + "Show/hide the 'Reboot' option.") MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_VIEWS_SETTINGS, "Quick Menu") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_VIEWS_SETTINGS, diff --git a/intl/msg_hash_us.h b/intl/msg_hash_us.h index b3f4446db9..fda0dd1aef 100644 --- a/intl/msg_hash_us.h +++ b/intl/msg_hash_us.h @@ -3151,6 +3151,34 @@ MSG_HASH(MENU_ENUM_SUBLABEL_RENAME_ENTRY, "Rename the title of the entry.") MSG_HASH(MENU_ENUM_LABEL_VALUE_RENAME_ENTRY, "Rename") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_LOAD_CORE, + "Show Load Core") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_LOAD_CORE, + "Show/hide the 'Load Core' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_LOAD_CONTENT, + "Show Load Content") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_LOAD_CONTENT, + "Show/hide the 'Load Content' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_INFORMATION, + "Show Information") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_INFORMATION, + "Show/hide the 'Information' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_CONFIGURATIONS, + "Show Configurations") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_CONFIGURATIONS, + "Show/hide the 'Configurations' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_HELP, + "Show Help") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_HELP, + "Show/hide the 'Help' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_QUIT_RETROARCH, + "Show Quit RetroArch") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_QUIT_RETROARCH, + "Show/hide the 'Quit RetroArch' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_REBOOT, + "Show Reboot") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_REBOOT, + "Show/hide the 'Reboot' option.") MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_VIEWS_SETTINGS, "Quick Menu") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_VIEWS_SETTINGS, diff --git a/intl/msg_hash_vn.h b/intl/msg_hash_vn.h index 55fa1417d9..a1ec403288 100644 --- a/intl/msg_hash_vn.h +++ b/intl/msg_hash_vn.h @@ -3087,6 +3087,34 @@ MSG_HASH(MENU_ENUM_SUBLABEL_PLAYLIST_ENTRY_RENAME, "Allow the user to rename entries in collections.") MSG_HASH(MENU_ENUM_LABEL_VALUE_PLAYLIST_ENTRY_RENAME, "Allow to rename entries") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_LOAD_CORE, + "Show Load Core") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_LOAD_CORE, + "Show/hide the 'Load Core' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_LOAD_CONTENT, + "Show Load Content") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_LOAD_CONTENT, + "Show/hide the 'Load Content' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_INFORMATION, + "Show Information") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_INFORMATION, + "Show/hide the 'Information' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_CONFIGURATIONS, + "Show Configurations") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_CONFIGURATIONS, + "Show/hide the 'Configurations' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_HELP, + "Show Help") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_HELP, + "Show/hide the 'Help' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_QUIT_RETROARCH, + "Show Quit RetroArch") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_QUIT_RETROARCH, + "Show/hide the 'Quit RetroArch' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_REBOOT, + "Show Reboot") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_REBOOT, + "Show/hide the 'Reboot' option.") MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_VIEWS_SETTINGS, "Quick Menu") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_VIEWS_SETTINGS, diff --git a/libretro-common/formats/libchdr/chd.c b/libretro-common/formats/libchdr/chd.c index 72169a1c94..08650d1030 100644 --- a/libretro-common/formats/libchdr/chd.c +++ b/libretro-common/formats/libchdr/chd.c @@ -621,6 +621,8 @@ chd_error cdlz_codec_decompress(void *codec, const uint8_t *src, uint32_t comple /* reset and decode */ lzma_codec_decompress(&cdlz->base_decompressor, &src[header_bytes], complen_base, &cdlz->buffer[0], frames * CD_MAX_SECTOR_DATA); #ifdef WANT_SUBCODE + if (header_bytes + complen_base >= complen) + return CHDERR_DECOMPRESSION_ERROR; zlib_codec_decompress(&cdlz->subcode_decompressor, &src[header_bytes + complen_base], complen - complen_base - header_bytes, &cdlz->buffer[frames * CD_MAX_SECTOR_DATA], frames * CD_MAX_SUBCODE_DATA); #endif @@ -2047,170 +2049,178 @@ static chd_error hunk_read_into_cache(chd_file *chd, UINT32 hunknum) static chd_error hunk_read_into_memory(chd_file *chd, UINT32 hunknum, UINT8 *dest) { - chd_error err; + chd_error err; - /* punt if no file */ - if (chd->file == NULL) - return CHDERR_INVALID_FILE; + /* punt if no file */ + if (chd->file == NULL) + return CHDERR_INVALID_FILE; - /* return an error if out of range */ - if (hunknum >= chd->header.totalhunks) - return CHDERR_HUNK_OUT_OF_RANGE; + /* return an error if out of range */ + if (hunknum >= chd->header.totalhunks) + return CHDERR_HUNK_OUT_OF_RANGE; - if (dest == NULL) - return CHDERR_INVALID_PARAMETER; + if (dest == NULL) + return CHDERR_INVALID_PARAMETER; - if (chd->header.version < 5) - { - void* codec; - map_entry *entry = &chd->map[hunknum]; - UINT32 bytes; + if (chd->header.version < 5) + { + void* codec; + map_entry *entry = &chd->map[hunknum]; + UINT32 bytes; - /* switch off the entry type */ - switch (entry->flags & MAP_ENTRY_FLAG_TYPE_MASK) - { - /* compressed data */ - case V34_MAP_ENTRY_TYPE_COMPRESSED: + /* switch off the entry type */ + switch (entry->flags & MAP_ENTRY_FLAG_TYPE_MASK) + { + /* compressed data */ + case V34_MAP_ENTRY_TYPE_COMPRESSED: - /* read it into the decompression buffer */ - core_fseek(chd->file, entry->offset, SEEK_SET); - bytes = core_fread(chd->file, chd->compressed, entry->length); - if (bytes != entry->length) - return CHDERR_READ_ERROR; + /* read it into the decompression buffer */ + if (core_fseek(chd->file, entry->offset, SEEK_SET) != 0) + return CHDERR_READ_ERROR; + bytes = core_fread(chd->file, chd->compressed, entry->length); + if (bytes != entry->length) + return CHDERR_READ_ERROR; - /* now decompress using the codec */ - err = CHDERR_NONE; - codec = &chd->zlib_codec_data; - if (chd->codecintf[0]->decompress != NULL) - err = (*chd->codecintf[0]->decompress)(codec, chd->compressed, entry->length, dest, chd->header.hunkbytes); - if (err != CHDERR_NONE) - return err; - break; + /* now decompress using the codec */ + err = CHDERR_NONE; + codec = &chd->zlib_codec_data; + if (chd->codecintf[0]->decompress != NULL) + err = (*chd->codecintf[0]->decompress)(codec, chd->compressed, entry->length, dest, chd->header.hunkbytes); + if (err != CHDERR_NONE) + return err; + break; - /* uncompressed data */ - case V34_MAP_ENTRY_TYPE_UNCOMPRESSED: - core_fseek(chd->file, entry->offset, SEEK_SET); - bytes = core_fread(chd->file, dest, chd->header.hunkbytes); - if (bytes != chd->header.hunkbytes) - return CHDERR_READ_ERROR; - break; + /* uncompressed data */ + case V34_MAP_ENTRY_TYPE_UNCOMPRESSED: + if (core_fseek(chd->file, entry->offset, SEEK_SET) != 0) + return CHDERR_READ_ERROR; + bytes = core_fread(chd->file, dest, chd->header.hunkbytes); + if (bytes != chd->header.hunkbytes) + return CHDERR_READ_ERROR; + break; - /* mini-compressed data */ - case V34_MAP_ENTRY_TYPE_MINI: - put_bigendian_uint64(&dest[0], entry->offset); - for (bytes = 8; bytes < chd->header.hunkbytes; bytes++) - dest[bytes] = dest[bytes - 8]; - break; + /* mini-compressed data */ + case V34_MAP_ENTRY_TYPE_MINI: + put_bigendian_uint64(&dest[0], entry->offset); + for (bytes = 8; bytes < chd->header.hunkbytes; bytes++) + dest[bytes] = dest[bytes - 8]; + break; - /* self-referenced data */ - case V34_MAP_ENTRY_TYPE_SELF_HUNK: + /* self-referenced data */ + case V34_MAP_ENTRY_TYPE_SELF_HUNK: #ifdef NEED_CACHE_HUNK - if (chd->cachehunk == entry->offset && dest == chd->cache) - break; + if (chd->cachehunk == entry->offset && dest == chd->cache) + break; #endif - return hunk_read_into_memory(chd, entry->offset, dest); + return hunk_read_into_memory(chd, entry->offset, dest); - /* parent-referenced data */ - case V34_MAP_ENTRY_TYPE_PARENT_HUNK: - err = hunk_read_into_memory(chd->parent, entry->offset, dest); - if (err != CHDERR_NONE) - return err; - break; - } - return CHDERR_NONE; - } - else - { - void* codec = NULL; - /* get a pointer to the map entry */ - uint64_t blockoffs; - uint32_t blocklen; + /* parent-referenced data */ + case V34_MAP_ENTRY_TYPE_PARENT_HUNK: + err = hunk_read_into_memory(chd->parent, entry->offset, dest); + if (err != CHDERR_NONE) + return err; + break; + } + return CHDERR_NONE; + } + else + { + void* codec = NULL; + /* get a pointer to the map entry */ + uint64_t blockoffs; + uint32_t blocklen; #ifdef VERIFY_BLOCK_CRC - uint16_t blockcrc; + uint16_t blockcrc; #endif - uint8_t *rawmap = &chd->header.rawmap[chd->header.mapentrybytes * hunknum]; + uint8_t *rawmap = &chd->header.rawmap[chd->header.mapentrybytes * hunknum]; - /* uncompressed case */ - /* TODO - if (!compressed()) - { - blockoffs = uint64_t(be_read(rawmap, 4)) * uint64_t(m_hunkbytes); - if (blockoffs != 0) - file_read(blockoffs, dest, m_hunkbytes); - else if (m_parent_missing) - throw CHDERR_REQUIRES_PARENT; - else if (m_parent != nullptr) - m_parent->read_hunk(hunknum, dest); - else - memset(dest, 0, m_hunkbytes); - return CHDERR_NONE; - }*/ + /* uncompressed case */ + /* TODO + if (!compressed()) + { + blockoffs = uint64_t(be_read(rawmap, 4)) * uint64_t(m_hunkbytes); + if (blockoffs != 0) + file_read(blockoffs, dest, m_hunkbytes); + else if (m_parent_missing) + throw CHDERR_REQUIRES_PARENT; + else if (m_parent != nullptr) + m_parent->read_hunk(hunknum, dest); + else + memset(dest, 0, m_hunkbytes); + return CHDERR_NONE; + }*/ - /* compressed case */ - blocklen = get_bigendian_uint24(&rawmap[1]); - blockoffs = get_bigendian_uint48(&rawmap[4]); + /* compressed case */ + blocklen = get_bigendian_uint24(&rawmap[1]); + blockoffs = get_bigendian_uint48(&rawmap[4]); #ifdef VERIFY_BLOCK_CRC - blockcrc = get_bigendian_uint16(&rawmap[10]); + blockcrc = get_bigendian_uint16(&rawmap[10]); #endif - switch (rawmap[0]) - { - case COMPRESSION_TYPE_0: - case COMPRESSION_TYPE_1: - case COMPRESSION_TYPE_2: - case COMPRESSION_TYPE_3: - core_fseek(chd->file, blockoffs, SEEK_SET); - core_fread(chd->file, chd->compressed, blocklen); - switch (chd->codecintf[rawmap[0]]->compression) - { - case CHD_CODEC_CD_LZMA: - codec = &chd->cdlz_codec_data; - break; + switch (rawmap[0]) + { + case COMPRESSION_TYPE_0: + case COMPRESSION_TYPE_1: + case COMPRESSION_TYPE_2: + case COMPRESSION_TYPE_3: + if (core_fseek(chd->file, blockoffs, SEEK_SET) != 0) + return CHDERR_READ_ERROR; + if (core_fread(chd->file, chd->compressed, blocklen) != blocklen) + return CHDERR_READ_ERROR; - case CHD_CODEC_CD_ZLIB: - codec = &chd->cdzl_codec_data; - break; + switch (chd->codecintf[rawmap[0]]->compression) + { + case CHD_CODEC_CD_LZMA: + codec = &chd->cdlz_codec_data; + break; - case CHD_CODEC_CD_FLAC: - codec = &chd->cdfl_codec_data; - break; - } - if (codec==NULL) - return CHDERR_CODEC_ERROR; - err = (*chd->codecintf[rawmap[0]]->decompress)(codec, chd->compressed, blocklen, dest, chd->header.hunkbytes); - if (err != CHDERR_NONE) - return err; + case CHD_CODEC_CD_ZLIB: + codec = &chd->cdzl_codec_data; + break; + + case CHD_CODEC_CD_FLAC: + codec = &chd->cdfl_codec_data; + break; + } + if (codec==NULL) + return CHDERR_CODEC_ERROR; + err = (*chd->codecintf[rawmap[0]]->decompress)(codec, chd->compressed, blocklen, dest, chd->header.hunkbytes); + if (err != CHDERR_NONE) + return err; #ifdef VERIFY_BLOCK_CRC - if (crc16(dest, chd->header.hunkbytes) != blockcrc) - return CHDERR_DECOMPRESSION_ERROR; + if (crc16(dest, chd->header.hunkbytes) != blockcrc) + return CHDERR_DECOMPRESSION_ERROR; #endif - return CHDERR_NONE; + return CHDERR_NONE; - case COMPRESSION_NONE: - core_fseek(chd->file, blockoffs, SEEK_SET); - core_fread(chd->file, dest, chd->header.hunkbytes); + case COMPRESSION_NONE: + if (core_fseek(chd->file, blockoffs, SEEK_SET) != 0) + return CHDERR_READ_ERROR; + if (core_fread(chd->file, dest, chd->header.hunkbytes) != chd->header.hunkbytes) + return CHDERR_READ_ERROR; #ifdef VERIFY_BLOCK_CRC - if (crc16(dest, chd->header.hunkbytes) != blockcrc) - return CHDERR_DECOMPRESSION_ERROR; + if (crc16(dest, chd->header.hunkbytes) != blockcrc) + return CHDERR_DECOMPRESSION_ERROR; #endif - return CHDERR_NONE; + return CHDERR_NONE; - case COMPRESSION_SELF: - return hunk_read_into_memory(chd, blockoffs, dest); + case COMPRESSION_SELF: + return hunk_read_into_memory(chd, blockoffs, dest); - case COMPRESSION_PARENT: - /* TODO */ + case COMPRESSION_PARENT: + /* TODO */ #if 0 - if (m_parent_missing) - return CHDERR_REQUIRES_PARENT; - return m_parent->read_bytes(uint64_t(blockoffs) * uint64_t(m_parent->unit_bytes()), dest, m_hunkbytes); + if (m_parent_missing) + return CHDERR_REQUIRES_PARENT; + return m_parent->read_bytes(uint64_t(blockoffs) * uint64_t(m_parent->unit_bytes()), dest, m_hunkbytes); #endif - return CHDERR_DECOMPRESSION_ERROR; - } - return CHDERR_NONE; - } + return CHDERR_DECOMPRESSION_ERROR; + } - /* We should not reach this code */ - return CHDERR_DECOMPRESSION_ERROR; + return CHDERR_NONE; + } + + /* We should not reach this code */ + return CHDERR_DECOMPRESSION_ERROR; } diff --git a/libretro-common/formats/libchdr/huffman.c b/libretro-common/formats/libchdr/huffman.c index 3478ad9210..09b3e62026 100644 --- a/libretro-common/formats/libchdr/huffman.c +++ b/libretro-common/formats/libchdr/huffman.c @@ -300,10 +300,14 @@ enum huffman_error huffman_import_tree_huffman(struct huffman_decoder* decoder, /* assign canonical codes for all nodes based on their code lengths */ error = huffman_assign_canonical_codes(decoder); if (error != HUFFERR_NONE) + { + delete_huffman_decoder(smallhuff); return error; + } /* build the lookup table */ huffman_build_lookup_table(decoder); + delete_huffman_decoder(smallhuff); /* determine final input length and report errors */ return bitstream_overflow(bitbuf) ? HUFFERR_INPUT_BUFFER_TOO_SMALL : HUFFERR_NONE; diff --git a/menu/cbs/menu_cbs_ok.c b/menu/cbs/menu_cbs_ok.c index d05c7c8277..32cc1edf26 100644 --- a/menu/cbs/menu_cbs_ok.c +++ b/menu/cbs/menu_cbs_ok.c @@ -4736,10 +4736,6 @@ static int menu_cbs_init_bind_ok_compare_label(menu_file_list_cbs_t *cbs, case MENU_LABEL_ACCOUNTS_RETRO_ACHIEVEMENTS: BIND_ACTION_OK(cbs, action_ok_push_accounts_cheevos_list); break; - case MENU_LABEL_SCAN_FILE: - BIND_ACTION_OK(cbs, action_ok_push_scan_file); - break; - case MENU_LABEL_SCAN_DIRECTORY: case MENU_LABEL_FAVORITES: BIND_ACTION_OK(cbs, action_ok_push_content_list); break; diff --git a/menu/cbs/menu_cbs_sublabel.c b/menu/cbs/menu_cbs_sublabel.c index da7e251cc7..94660b0391 100644 --- a/menu/cbs/menu_cbs_sublabel.c +++ b/menu/cbs/menu_cbs_sublabel.c @@ -303,6 +303,13 @@ default_sublabel_macro(action_bind_sublabel_quick_menu_show_save_game_overrides, default_sublabel_macro(action_bind_sublabel_quick_menu_show_information, MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_INFORMATION) default_sublabel_macro(action_bind_sublabel_menu_favorites_tab, MENU_ENUM_SUBLABEL_XMB_SHOW_FAVORITES) default_sublabel_macro(action_bind_sublabel_menu_images_tab, MENU_ENUM_SUBLABEL_XMB_SHOW_IMAGES) +default_sublabel_macro(action_bind_sublabel_menu_show_load_core, MENU_ENUM_SUBLABEL_MENU_SHOW_LOAD_CORE) +default_sublabel_macro(action_bind_sublabel_menu_show_load_content, MENU_ENUM_SUBLABEL_MENU_SHOW_LOAD_CONTENT) +default_sublabel_macro(action_bind_sublabel_menu_show_information, MENU_ENUM_SUBLABEL_MENU_SHOW_INFORMATION) +default_sublabel_macro(action_bind_sublabel_menu_show_configurations, MENU_ENUM_SUBLABEL_MENU_SHOW_CONFIGURATIONS) +default_sublabel_macro(action_bind_sublabel_menu_show_help, MENU_ENUM_SUBLABEL_MENU_SHOW_HELP) +default_sublabel_macro(action_bind_sublabel_menu_show_quit_retroarch, MENU_ENUM_SUBLABEL_MENU_SHOW_QUIT_RETROARCH) +default_sublabel_macro(action_bind_sublabel_menu_show_reboot, MENU_ENUM_SUBLABEL_MENU_SHOW_REBOOT) default_sublabel_macro(action_bind_sublabel_menu_show_online_updater, MENU_ENUM_SUBLABEL_MENU_SHOW_ONLINE_UPDATER) default_sublabel_macro(action_bind_sublabel_menu_show_core_updater, MENU_ENUM_SUBLABEL_MENU_SHOW_CORE_UPDATER) default_sublabel_macro(action_bind_sublabel_menu_music_tab, MENU_ENUM_SUBLABEL_XMB_SHOW_MUSIC) @@ -645,6 +652,27 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs, case MENU_ENUM_LABEL_XMB_SHOW_MUSIC: BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_menu_music_tab); break; + case MENU_ENUM_LABEL_MENU_SHOW_LOAD_CORE: + BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_menu_show_load_core); + break; + case MENU_ENUM_LABEL_MENU_SHOW_LOAD_CONTENT: + BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_menu_show_load_content); + break; + case MENU_ENUM_LABEL_MENU_SHOW_INFORMATION: + BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_menu_show_information); + break; + case MENU_ENUM_LABEL_MENU_SHOW_CONFIGURATIONS: + BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_menu_show_configurations); + break; + case MENU_ENUM_LABEL_MENU_SHOW_HELP: + BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_menu_show_help); + break; + case MENU_ENUM_LABEL_MENU_SHOW_QUIT_RETROARCH: + BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_menu_show_quit_retroarch); + break; + case MENU_ENUM_LABEL_MENU_SHOW_REBOOT: + BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_menu_show_reboot); + break; case MENU_ENUM_LABEL_MENU_SHOW_ONLINE_UPDATER: BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_menu_show_online_updater); break; diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index 4a232ca9a0..ef6b4a71fa 100755 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -4322,12 +4322,18 @@ static int xmb_list_push(void *data, void *userdata, if (frontend_driver_has_fork()) #endif { - entry.enum_idx = MENU_ENUM_LABEL_CORE_LIST; - menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry); + if (settings->bools.menu_show_load_core) + { + entry.enum_idx = MENU_ENUM_LABEL_CORE_LIST; + menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry); + } } - entry.enum_idx = MENU_ENUM_LABEL_LOAD_CONTENT_LIST; - menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry); + if (settings->bools.menu_show_load_content) + { + entry.enum_idx = MENU_ENUM_LABEL_LOAD_CONTENT_LIST; + menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry); + } entry.enum_idx = MENU_ENUM_LABEL_ADD_CONTENT_LIST; menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry); @@ -4347,23 +4353,42 @@ static int xmb_list_push(void *data, void *userdata, menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry); } - entry.enum_idx = MENU_ENUM_LABEL_INFORMATION_LIST; - menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry); + if (settings->bools.menu_show_information) + { + entry.enum_idx = MENU_ENUM_LABEL_INFORMATION_LIST; + menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry); + } + #ifndef HAVE_DYNAMIC entry.enum_idx = MENU_ENUM_LABEL_RESTART_RETROARCH; menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry); #endif - entry.enum_idx = MENU_ENUM_LABEL_CONFIGURATIONS_LIST; - menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry); - entry.enum_idx = MENU_ENUM_LABEL_HELP_LIST; - menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry); + if (settings->bools.menu_show_configurations) + { + entry.enum_idx = MENU_ENUM_LABEL_CONFIGURATIONS_LIST; + menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry); + } + + if (settings->bools.menu_show_help) + { + entry.enum_idx = MENU_ENUM_LABEL_HELP_LIST; + menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry); + } + #if !defined(IOS) - entry.enum_idx = MENU_ENUM_LABEL_QUIT_RETROARCH; - menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry); + if (settings->bools.menu_show_quit_retroarch) + { + entry.enum_idx = MENU_ENUM_LABEL_QUIT_RETROARCH; + menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry); + } #endif - entry.enum_idx = MENU_ENUM_LABEL_REBOOT; - menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry); + + if (settings->bools.menu_show_reboot) + { + entry.enum_idx = MENU_ENUM_LABEL_REBOOT; + menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry); + } entry.enum_idx = MENU_ENUM_LABEL_SHUTDOWN; menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry); diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c index f0357d7316..3abcf26721 100644 --- a/menu/menu_displaylist.c +++ b/menu/menu_displaylist.c @@ -5318,14 +5318,47 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data) MENU_ENUM_LABEL_QUICK_MENU_VIEWS_SETTINGS, PARSE_ACTION, false); -#if defined(HAVE_NETWORKING) && !defined(HAVE_LAKKA) + menu_displaylist_parse_settings_enum(menu, info, + MENU_ENUM_LABEL_MENU_SHOW_LOAD_CORE, + PARSE_ONLY_BOOL, false); + + menu_displaylist_parse_settings_enum(menu, info, + MENU_ENUM_LABEL_MENU_SHOW_LOAD_CONTENT, + PARSE_ONLY_BOOL, false); + +#if defined(HAVE_NETWORKING) menu_displaylist_parse_settings_enum(menu, info, MENU_ENUM_LABEL_MENU_SHOW_ONLINE_UPDATER, PARSE_ONLY_BOOL, false); +#if !defined(HAVE_LAKKA) menu_displaylist_parse_settings_enum(menu, info, MENU_ENUM_LABEL_MENU_SHOW_CORE_UPDATER, PARSE_ONLY_BOOL, false); #endif +#endif + + menu_displaylist_parse_settings_enum(menu, info, + MENU_ENUM_LABEL_MENU_SHOW_INFORMATION, + PARSE_ONLY_BOOL, false); + + menu_displaylist_parse_settings_enum(menu, info, + MENU_ENUM_LABEL_MENU_SHOW_CONFIGURATIONS, + PARSE_ONLY_BOOL, false); + + menu_displaylist_parse_settings_enum(menu, info, + MENU_ENUM_LABEL_MENU_SHOW_HELP, + PARSE_ONLY_BOOL, false); + +#if defined(HAVE_LAKKA) + menu_displaylist_parse_settings_enum(menu, info, + MENU_ENUM_LABEL_MENU_SHOW_QUIT_RETROARCH, + PARSE_ONLY_BOOL, false); + + menu_displaylist_parse_settings_enum(menu, info, + MENU_ENUM_LABEL_MENU_SHOW_REBOOT, + PARSE_ONLY_BOOL, false); +#endif + menu_displaylist_parse_settings_enum(menu, info, MENU_ENUM_LABEL_XMB_SHOW_SETTINGS, PARSE_ONLY_BOOL, false); diff --git a/menu/menu_setting.c b/menu/menu_setting.c index 64bea69f60..9318302ce2 100644 --- a/menu/menu_setting.c +++ b/menu/menu_setting.c @@ -5387,6 +5387,111 @@ static bool setting_append_list( general_read_handler); menu_settings_list_current_add_range(list, list_info, 0, XMB_THEME_LAST-1, 1, true, true); + CONFIG_BOOL( + list, list_info, + &settings->bools.menu_show_load_core, + MENU_ENUM_LABEL_MENU_SHOW_LOAD_CORE, + MENU_ENUM_LABEL_VALUE_MENU_SHOW_LOAD_CORE, + menu_show_load_core, + MENU_ENUM_LABEL_VALUE_OFF, + MENU_ENUM_LABEL_VALUE_ON, + &group_info, + &subgroup_info, + parent_group, + general_write_handler, + general_read_handler, + SD_FLAG_NONE); + + CONFIG_BOOL( + list, list_info, + &settings->bools.menu_show_load_content, + MENU_ENUM_LABEL_MENU_SHOW_LOAD_CONTENT, + MENU_ENUM_LABEL_VALUE_MENU_SHOW_LOAD_CONTENT, + menu_show_load_content, + MENU_ENUM_LABEL_VALUE_OFF, + MENU_ENUM_LABEL_VALUE_ON, + &group_info, + &subgroup_info, + parent_group, + general_write_handler, + general_read_handler, + SD_FLAG_NONE); + + CONFIG_BOOL( + list, list_info, + &settings->bools.menu_show_information, + MENU_ENUM_LABEL_MENU_SHOW_INFORMATION, + MENU_ENUM_LABEL_VALUE_MENU_SHOW_INFORMATION, + menu_show_information, + MENU_ENUM_LABEL_VALUE_OFF, + MENU_ENUM_LABEL_VALUE_ON, + &group_info, + &subgroup_info, + parent_group, + general_write_handler, + general_read_handler, + SD_FLAG_NONE); + + CONFIG_BOOL( + list, list_info, + &settings->bools.menu_show_configurations, + MENU_ENUM_LABEL_MENU_SHOW_CONFIGURATIONS, + MENU_ENUM_LABEL_VALUE_MENU_SHOW_CONFIGURATIONS, + menu_show_configurations, + MENU_ENUM_LABEL_VALUE_OFF, + MENU_ENUM_LABEL_VALUE_ON, + &group_info, + &subgroup_info, + parent_group, + general_write_handler, + general_read_handler, + SD_FLAG_LAKKA_ADVANCED); + + CONFIG_BOOL( + list, list_info, + &settings->bools.menu_show_help, + MENU_ENUM_LABEL_MENU_SHOW_HELP, + MENU_ENUM_LABEL_VALUE_MENU_SHOW_HELP, + menu_show_help, + MENU_ENUM_LABEL_VALUE_OFF, + MENU_ENUM_LABEL_VALUE_ON, + &group_info, + &subgroup_info, + parent_group, + general_write_handler, + general_read_handler, + SD_FLAG_LAKKA_ADVANCED); + + CONFIG_BOOL( + list, list_info, + &settings->bools.menu_show_quit_retroarch, + MENU_ENUM_LABEL_MENU_SHOW_QUIT_RETROARCH, + MENU_ENUM_LABEL_VALUE_MENU_SHOW_QUIT_RETROARCH, + menu_show_quit_retroarch, + MENU_ENUM_LABEL_VALUE_OFF, + MENU_ENUM_LABEL_VALUE_ON, + &group_info, + &subgroup_info, + parent_group, + general_write_handler, + general_read_handler, + SD_FLAG_NONE); + + CONFIG_BOOL( + list, list_info, + &settings->bools.menu_show_reboot, + MENU_ENUM_LABEL_MENU_SHOW_REBOOT, + MENU_ENUM_LABEL_VALUE_MENU_SHOW_REBOOT, + menu_show_reboot, + MENU_ENUM_LABEL_VALUE_OFF, + MENU_ENUM_LABEL_VALUE_ON, + &group_info, + &subgroup_info, + parent_group, + general_write_handler, + general_read_handler, + SD_FLAG_NONE); + CONFIG_BOOL( list, list_info, &settings->bools.menu_xmb_show_settings, diff --git a/menu/widgets/menu_entry.c b/menu/widgets/menu_entry.c index 3c3fc7335f..381abd9e41 100644 --- a/menu/widgets/menu_entry.c +++ b/menu/widgets/menu_entry.c @@ -310,8 +310,8 @@ void menu_entry_get(menu_entry_t *entry, size_t stack_idx, if (!list) return; - menu_entries_get_at_offset(list, i, &path, &entry_label, &entry->type, - &entry->entry_idx, NULL); + file_list_get_at_offset(list, i, &path, &entry_label, &entry->type, + &entry->entry_idx); cbs = (menu_file_list_cbs_t*)file_list_get_actiondata_at_offset(list, i); @@ -330,7 +330,8 @@ void menu_entry_get(menu_entry_t *entry, size_t stack_idx, tmp[0] = '\0'; cbs->action_get_value(list, - &entry->spacing, entry->type, (unsigned)i, label, + &entry->spacing, entry->type, + (unsigned)i, label, tmp, sizeof(tmp), entry_label, path, @@ -375,11 +376,13 @@ void menu_entry_get(menu_entry_t *entry, size_t stack_idx, entry->idx = (unsigned)i; - if (path && !use_representation) + if (!string_is_empty(path) && !use_representation) strlcpy(newpath, path, sizeof(newpath)); else if (cbs && cbs->setting && cbs->setting->enum_value_idx != MSG_UNKNOWN && !cbs->setting->dont_use_enum_idx_representation) - strlcpy(newpath, msg_hash_to_str(cbs->setting->enum_value_idx), sizeof(newpath)); + strlcpy(newpath, + msg_hash_to_str(cbs->setting->enum_value_idx), + sizeof(newpath)); if (!string_is_empty(newpath)) entry->path = strdup(newpath); diff --git a/msg_hash.h b/msg_hash.h index fb38c9f06c..5c221e4f1e 100644 --- a/msg_hash.h +++ b/msg_hash.h @@ -672,6 +672,13 @@ enum msg_hash_enums /* Menu settings */ + MENU_LABEL(MENU_SHOW_LOAD_CORE), + MENU_LABEL(MENU_SHOW_LOAD_CONTENT), + MENU_LABEL(MENU_SHOW_INFORMATION), + MENU_LABEL(MENU_SHOW_CONFIGURATIONS), + MENU_LABEL(MENU_SHOW_HELP), + MENU_LABEL(MENU_SHOW_QUIT_RETROARCH), + MENU_LABEL(MENU_SHOW_REBOOT), MENU_LABEL(MENU_SHOW_ONLINE_UPDATER), MENU_LABEL(MENU_SHOW_CORE_UPDATER), MENU_LABEL(RUN_MUSIC), @@ -1716,11 +1723,6 @@ enum msg_hash_enums #define MENU_LABEL_DOWNLOADED_FILE_DETECT_CORE_LIST 0xb4f82700U -/* Scan values */ -#define MENU_LABEL_SCAN_THIS_DIRECTORY 0x6921b775U -#define MENU_LABEL_SCAN_DIRECTORY 0x57de303eU -#define MENU_LABEL_SCAN_FILE 0xd5d1eee9U - /* Online updater settings */ #define MENU_LABEL_UPDATE_LAKKA 0x19b51eebU diff --git a/qb/config.libs.sh b/qb/config.libs.sh index bd8ed4dc28..9ceb60426a 100644 --- a/qb/config.libs.sh +++ b/qb/config.libs.sh @@ -38,16 +38,28 @@ add_define_make DYLIB_LIB "$DYLIB" check_lib SYSTEMD -lsystemd sd_get_machine_names if [ "$HAVE_VIDEOCORE" != "no" ]; then - [ -d /opt/vc/lib ] && add_library_dirs /opt/vc/lib && add_library_dirs /opt/vc/lib/GL - check_lib VIDEOCORE -lbcm_host bcm_host_init "-lvcos -lvchiq_arm" + check_pkgconf VC_TEST bcm_host + + # use fallback if pkgconfig is not available + if [ ! "$VC_TEST_LIBS" ]; then + [ -d /opt/vc/lib ] && add_library_dirs /opt/vc/lib && add_library_dirs /opt/vc/lib/GL + check_lib VIDEOCORE -lbcm_host bcm_host_init "-lvcos -lvchiq_arm" + else + HAVE_VIDEOCORE="$HAVE_VC_TEST" + fi fi if [ "$HAVE_VIDEOCORE" = 'yes' ]; then - [ -d /opt/vc/include ] && add_include_dirs /opt/vc/include - [ -d /opt/vc/include/interface/vcos/pthreads ] && add_include_dirs /opt/vc/include/interface/vcos/pthreads - [ -d /opt/vc/include/interface/vmcs_host/linux ] && add_include_dirs /opt/vc/include/interface/vmcs_host/linux HAVE_OPENGLES='auto' - EXTRA_GL_LIBS="-lbrcmEGL -lbrcmGLESv2 -lbcm_host -lvcos -lvchiq_arm" + VC_PREFIX="brcm" + + # use fallback if pkgconfig is not available + if [ ! "$VC_TEST_LIBS" ]; then + [ -d /opt/vc/include ] && add_include_dirs /opt/vc/include + [ -d /opt/vc/include/interface/vcos/pthreads ] && add_include_dirs /opt/vc/include/interface/vcos/pthreads + [ -d /opt/vc/include/interface/vmcs_host/linux ] && add_include_dirs /opt/vc/include/interface/vmcs_host/linux + EXTRA_GL_LIBS="-lbrcmEGL -lbrcmGLESv2 -lbcm_host -lvcos -lvchiq_arm" + fi fi if [ "$HAVE_NEON" = "yes" ]; then @@ -101,11 +113,11 @@ if [ "$HAVE_SSE" = "yes" ]; then fi if [ "$HAVE_EGL" != "no" -a "$OS" != 'Win32' ]; then - check_pkgconf EGL egl + check_pkgconf EGL "$VC_PREFIX"egl # some systems have EGL libs, but no pkgconfig if [ "$HAVE_EGL" = "no" ]; then - HAVE_EGL=auto && check_lib EGL "-lEGL $EXTRA_GL_LIBS" - [ "$HAVE_EGL" = "yes" ] && EGL_LIBS=-lEGL + HAVE_EGL=auto && check_lib EGL "-l"$VC_PREFIX"EGL $EXTRA_GL_LIBS" + [ "$HAVE_EGL" = "yes" ] && EGL_LIBS=-l"$VC_PREFIX"EGL else EGL_LIBS="$EGL_LIBS $EXTRA_GL_LIBS" fi @@ -378,15 +390,15 @@ if [ "$HAVE_EGL" = "yes" ]; then add_define_make OPENGLES_LIBS "$OPENGLES_LIBS" add_define_make OPENGLES_CFLAGS "$OPENGLES_CFLAGS" else - HAVE_OPENGLES=auto check_pkgconf OPENGLES glesv2 - [ "$HAVE_OPENGLES" = "no" ] && HAVE_OPENGLES=auto check_lib OPENGLES "-lGLESv2 $EXTRA_GL_LIBS" && add_define_make OPENGLES_LIBS "-lGLESv2 $EXTRA_GL_LIBS" + HAVE_OPENGLES=auto check_pkgconf OPENGLES "$VC_PREFIX"glesv2 + [ "$HAVE_OPENGLES" = "no" ] && HAVE_OPENGLES=auto check_lib OPENGLES "-l"$VC_PREFIX"GLESv2 $EXTRA_GL_LIBS" && add_define_make OPENGLES_LIBS "-l"$VC_PREFIX"GLESv2 $EXTRA_GL_LIBS" fi fi if [ "$HAVE_VG" != "no" ]; then - check_pkgconf VG vg + check_pkgconf VG "$VC_PREFIX"vg if [ "$HAVE_VG" = "no" ]; then - HAVE_VG=auto check_lib VG "-lOpenVG $EXTRA_GL_LIBS" - [ "$HAVE_VG" = "yes" ] && VG_LIBS=-lOpenVG + HAVE_VG=auto check_lib VG "-l"$VC_PREFIX"OpenVG $EXTRA_GL_LIBS" + [ "$HAVE_VG" = "yes" ] && VG_LIBS=-l"$VC_PREFIX"OpenVG fi fi else