From 6f824a8fdd1cf590f1a8b2051be0b21780869b8e Mon Sep 17 00:00:00 2001 From: Alwin Esch Date: Thu, 23 Dec 2021 10:24:06 +0100 Subject: [PATCH 1/4] sync translations with Matrix version --- peripheral.joystick/addon.xml.in | 3 +++ .../resource.language.fr_fr/strings.po | 27 ++++++++++--------- .../resource.language.pt_br/strings.po | 26 +++++++++--------- 3 files changed, 30 insertions(+), 26 deletions(-) diff --git a/peripheral.joystick/addon.xml.in b/peripheral.joystick/addon.xml.in index f6ceac6f..082c3219 100644 --- a/peripheral.joystick/addon.xml.in +++ b/peripheral.joystick/addon.xml.in @@ -23,8 +23,10 @@ Kodi Joystick Library Librería Kodi Joystick Biblioteca de Joysticks de Kodi + Bibliothèque de joystick Kodi Kodi 조이스틱 라이브러리 Biblioteka joysticków Kodi + Biblioteca de Joystick do Kodi Каталог джойстиков для Kodi Kodi Oyun Çubuğu Kütüphanesi Kodi 游戏杆库 @@ -36,6 +38,7 @@ Esta biblioteca provee controladores de joysticks y mapas de botones. Múltiples APIs de joystick están soportadas, incluyendo DirectX, XInput, SDL y la Linux Joystick API. 이 라이브러리는 조이스틱 드라이버와 버튼 맵을 제공합니다. DirectX, XInput, SDL 및 Linux Joystick API를 비롯한 여러 조이스틱 API가 지원됩니다. Ta biblioteka zawiera sterowniki joysticków i mapy przycisków. Obsługiwanych jest wiele interfejsów API joysticków, m.in. DirectX, XInput, SDL oraz Joystick API systemu Linux. + Esta biblioteca fornece drivers de joystick e mapeamento de botões. Diversas APIs de joystick são suportadas, incluindo DirectX, XInput, SDL e API de Joystick do Linux. Этот каталог предоставляет драйверы джойстиков и схемы расположения кнопок. Поддерживается несколько API джойстиков, включая DirectX, XInput, SDL и Linux Joystick API. Bu kitaplık, oyun çubuğu sürücüleri ve düğme haritaları sağlar. DirectX, XInput, SDL ve Linux Oyun Çubuğu API dahil olmak üzere çoklu oyun çubuğu API'leri desteklenir. 此库提供游戏杆驱动程序和按钮图。支持多个游戏杆 API,包括 DirectX、XInput、SDL 和 Linux 游戏杆 API。 diff --git a/peripheral.joystick/resources/language/resource.language.fr_fr/strings.po b/peripheral.joystick/resources/language/resource.language.fr_fr/strings.po index fa07a824..1fc000ba 100644 --- a/peripheral.joystick/resources/language/resource.language.fr_fr/strings.po +++ b/peripheral.joystick/resources/language/resource.language.fr_fr/strings.po @@ -5,33 +5,34 @@ msgid "" msgstr "" "Project-Id-Version: peripheral.joystick\n" -"Report-Msgid-Bugs-To: alanwww1@xbmc.org\n" +"Report-Msgid-Bugs-To: translations@kodi.tv\n" "POT-Creation-Date: 2016-12-06 21:53i\n" -"PO-Revision-Date: 2021-05-23 08:29+0000\n" -"Last-Translator: Christian Gade \n" +"PO-Revision-Date: 2021-11-23 14:47+0000\n" +"Last-Translator: Édouard Duliège \n" "Language-Team: French (France) \n" "Language: fr_fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n > 1;\n" -"X-Generator: Weblate 4.6.2\n" +"X-Generator: Weblate 4.9\n" msgctxt "Addon Summary" msgid "Kodi Joystick Library" -msgstr "" +msgstr "Bibliothèque de joystick Kodi" msgctxt "Addon Description" msgid "This library provides joystick drivers and button maps. Multiple joystick APIs are supported, including DirectX, XInput, SDL and the Linux Joystick API." msgstr "" +#, fuzzy msgctxt "#30000" msgid "Driver settings" -msgstr "Paramètres des pilot" +msgstr "Paramètres des pilotes" msgctxt "#30001" msgid "Joystick driver" -msgstr "" +msgstr "Pilote du joystick" msgctxt "#30002" msgid "None" @@ -39,31 +40,31 @@ msgstr "Aucun" msgctxt "#30003" msgid "Enable XInput" -msgstr "" +msgstr "Activer XInput" msgctxt "#30004" msgid "Enable DirectInput" -msgstr "" +msgstr "Activer DirectInput" #. Do not translate msgctxt "#30005" msgid "Linux" -msgstr "" +msgstr "Linux" #. Do not translate msgctxt "#30006" msgid "Cocoa" -msgstr "" +msgstr "Cocoa" #. Do not translate msgctxt "#30007" msgid "Udev" -msgstr "" +msgstr "Udev" #. Do not translate msgctxt "#30008" msgid "SDL 2" -msgstr "" +msgstr "SDL 2" #msgctxt "#21475" #msgid "Both" diff --git a/peripheral.joystick/resources/language/resource.language.pt_br/strings.po b/peripheral.joystick/resources/language/resource.language.pt_br/strings.po index be26ba46..8ed8e62d 100644 --- a/peripheral.joystick/resources/language/resource.language.pt_br/strings.po +++ b/peripheral.joystick/resources/language/resource.language.pt_br/strings.po @@ -5,25 +5,25 @@ msgid "" msgstr "" "Project-Id-Version: peripheral.joystick\n" -"Report-Msgid-Bugs-To: alanwww1@xbmc.org\n" +"Report-Msgid-Bugs-To: translations@kodi.tv\n" "POT-Creation-Date: 2016-12-06 21:53i\n" -"PO-Revision-Date: 2021-05-23 08:29+0000\n" -"Last-Translator: Christian Gade \n" +"PO-Revision-Date: 2021-12-08 01:13+0000\n" +"Last-Translator: Fabio \n" "Language-Team: Portuguese (Brazil) \n" "Language: pt_br\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n > 1;\n" -"X-Generator: Weblate 4.6.2\n" +"X-Generator: Weblate 4.9.1\n" msgctxt "Addon Summary" msgid "Kodi Joystick Library" -msgstr "" +msgstr "Biblioteca de Joystick do Kodi" msgctxt "Addon Description" msgid "This library provides joystick drivers and button maps. Multiple joystick APIs are supported, including DirectX, XInput, SDL and the Linux Joystick API." -msgstr "" +msgstr "Esta biblioteca fornece drivers de joystick e mapeamento de botões. Diversas APIs de joystick são suportadas, incluindo DirectX, XInput, SDL e API de Joystick do Linux." msgctxt "#30000" msgid "Driver settings" @@ -31,7 +31,7 @@ msgstr "Ajustes do driver" msgctxt "#30001" msgid "Joystick driver" -msgstr "" +msgstr "Driver de joystick" msgctxt "#30002" msgid "None" @@ -39,31 +39,31 @@ msgstr "Nenhum" msgctxt "#30003" msgid "Enable XInput" -msgstr "" +msgstr "Ativar XInput" msgctxt "#30004" msgid "Enable DirectInput" -msgstr "" +msgstr "Ativar DirectInput" #. Do not translate msgctxt "#30005" msgid "Linux" -msgstr "" +msgstr "Linux" #. Do not translate msgctxt "#30006" msgid "Cocoa" -msgstr "" +msgstr "Cocoa" #. Do not translate msgctxt "#30007" msgid "Udev" -msgstr "" +msgstr "Udev" #. Do not translate msgctxt "#30008" msgid "SDL 2" -msgstr "" +msgstr "SDL 2" #msgctxt "#21475" #msgid "Both" From b43faa612daed6da6c3ba6e838cdd1fc2aa2342f Mon Sep 17 00:00:00 2001 From: Alwin Esch Date: Sat, 1 Jan 2022 12:00:10 +0100 Subject: [PATCH 2/4] API related update --- src/addon.cpp | 11 +---------- src/addon.h | 3 +-- src/filesystem/DirectoryCache.h | 4 +++- src/log/LogAddon.cpp | 2 +- src/settings/Settings.cpp | 2 +- src/settings/Settings.h | 2 +- src/storage/JustABunchOfFiles.h | 6 +++--- src/storage/xml/DatabaseXml.h | 2 +- 8 files changed, 12 insertions(+), 20 deletions(-) diff --git a/src/addon.cpp b/src/addon.cpp index eeb1eed1..44e746d1 100644 --- a/src/addon.cpp +++ b/src/addon.cpp @@ -47,21 +47,12 @@ ADDON_STATUS CPeripheralJoystick::Create() return ADDON_STATUS_NEED_SETTINGS; } -ADDON_STATUS CPeripheralJoystick::SetSetting(const std::string& settingName, const kodi::CSettingValue& settingValue) +ADDON_STATUS CPeripheralJoystick::SetSetting(const std::string& settingName, const kodi::addon::CSettingValue& settingValue) { CSettings::Get().SetSetting(settingName, settingValue); return ADDON_STATUS_OK; } - -ADDON_STATUS CPeripheralJoystick::GetStatus() -{ - if (!CSettings::Get().IsInitialized()) - return ADDON_STATUS_NEED_SETTINGS; - - return ADDON_STATUS_OK; -} - CPeripheralJoystick::~CPeripheralJoystick() { CStorageManager::Get().Deinitialize(); diff --git a/src/addon.h b/src/addon.h index 2934c8b1..d7e2e5d3 100644 --- a/src/addon.h +++ b/src/addon.h @@ -26,8 +26,7 @@ class DLL_PRIVATE CPeripheralJoystick virtual ~CPeripheralJoystick(); ADDON_STATUS Create() override; - ADDON_STATUS GetStatus() override; - ADDON_STATUS SetSetting(const std::string& settingName, const kodi::CSettingValue& settingValue) override; + ADDON_STATUS SetSetting(const std::string& settingName, const kodi::addon::CSettingValue& settingValue) override; void GetCapabilities(kodi::addon::PeripheralCapabilities& capabilities) override; PERIPHERAL_ERROR PerformDeviceScan(std::vector>& scan_results) override; diff --git a/src/filesystem/DirectoryCache.h b/src/filesystem/DirectoryCache.h index 35e8ab16..d93476ce 100644 --- a/src/filesystem/DirectoryCache.h +++ b/src/filesystem/DirectoryCache.h @@ -8,6 +8,8 @@ #pragma once +#include "utils/CommonMacros.h" + #include #include @@ -27,7 +29,7 @@ namespace JOYSTICK virtual void OnRemove(const kodi::vfs::CDirEntry& item) = 0; }; - class CDirectoryCache + class DLL_PRIVATE CDirectoryCache { public: void Initialize(IDirectoryCacheCallback* callbacks); diff --git a/src/log/LogAddon.cpp b/src/log/LogAddon.cpp index 76e871ff..9324ff81 100644 --- a/src/log/LogAddon.cpp +++ b/src/log/LogAddon.cpp @@ -20,7 +20,7 @@ CLogAddon::CLogAddon() void CLogAddon::Log(SYS_LOG_LEVEL level, const char* logline) { - AddonLog loglevel; + ADDON_LOG loglevel; switch (level) { diff --git a/src/settings/Settings.cpp b/src/settings/Settings.cpp index 7b7ca1c0..df07799f 100644 --- a/src/settings/Settings.cpp +++ b/src/settings/Settings.cpp @@ -33,7 +33,7 @@ CSettings& CSettings::Get(void) return _instance; } -void CSettings::SetSetting(const std::string& strName, const kodi::CSettingValue& value) +void CSettings::SetSetting(const std::string& strName, const kodi::addon::CSettingValue& value) { if (strName == SETTING_RETROARCH_CONFIG) { diff --git a/src/settings/Settings.h b/src/settings/Settings.h index f5682bdd..9d62ff5e 100644 --- a/src/settings/Settings.h +++ b/src/settings/Settings.h @@ -24,7 +24,7 @@ namespace JOYSTICK /*! * \brief Set the value of a setting. Called by the frontend. */ - void SetSetting(const std::string& strName, const kodi::CSettingValue& value); + void SetSetting(const std::string& strName, const kodi::addon::CSettingValue& value); /*! * \brief Check if the settings have been initialized diff --git a/src/storage/JustABunchOfFiles.h b/src/storage/JustABunchOfFiles.h index aca5c55d..f837c601 100644 --- a/src/storage/JustABunchOfFiles.h +++ b/src/storage/JustABunchOfFiles.h @@ -25,7 +25,7 @@ namespace JOYSTICK /*! * \brief Container class for device records and button maps */ - class CResources + class DLL_PRIVATE CResources { public: CResources(const CJustABunchOfFiles* database); @@ -55,8 +55,8 @@ namespace JOYSTICK ResourceMap m_resources; }; - class CJustABunchOfFiles : public IDatabase, - public IDirectoryCacheCallback + class DLL_PRIVATE CJustABunchOfFiles : public IDatabase, + public IDirectoryCacheCallback { public: CJustABunchOfFiles(const std::string& strResourcePath, diff --git a/src/storage/xml/DatabaseXml.h b/src/storage/xml/DatabaseXml.h index c2e49980..a6f5ee65 100644 --- a/src/storage/xml/DatabaseXml.h +++ b/src/storage/xml/DatabaseXml.h @@ -19,7 +19,7 @@ namespace JOYSTICK { class IControllerHelper; - class CDatabaseXml : public CJustABunchOfFiles + class DLL_PRIVATE CDatabaseXml : public CJustABunchOfFiles { public: CDatabaseXml(const std::string& strBasePath, bool bReadWrite, IDatabaseCallbacks* callbacks, IControllerHelper *controllerHelper); From ff9b6ca74fc7ed26446b8cf9d4d286368822b311 Mon Sep 17 00:00:00 2001 From: Alwin Esch Date: Sat, 1 Jan 2022 11:26:50 +0100 Subject: [PATCH 3/4] fix Azure pipeline build where still has taken Matrix branch --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 32274cb9..3ca288f4 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -46,7 +46,7 @@ jobs: - script: | cd .. - git clone --branch Matrix --depth=1 https://github.com/xbmc/xbmc.git kodi + git clone --branch master --depth=1 https://github.com/xbmc/xbmc.git kodi cd $(Build.SourcesDirectory) mkdir build cd build From 176a18e055267109b15401fa38b88d0891777e69 Mon Sep 17 00:00:00 2001 From: Alwin Esch Date: Thu, 23 Dec 2021 10:33:55 +0100 Subject: [PATCH 4/4] increase version to 20.1.0 --- peripheral.joystick/addon.xml.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/peripheral.joystick/addon.xml.in b/peripheral.joystick/addon.xml.in index 082c3219..f82e033e 100644 --- a/peripheral.joystick/addon.xml.in +++ b/peripheral.joystick/addon.xml.in @@ -1,7 +1,7 @@ @ADDON_DEPENDS@