Skip to content

Commit

Permalink
Merge pull request #226 from AlwinEsch/Nexus-change
Browse files Browse the repository at this point in the history
[Nexus] API related update
  • Loading branch information
AlwinEsch authored Jan 1, 2022
2 parents 2786720 + 176a18e commit f19f6f8
Show file tree
Hide file tree
Showing 12 changed files with 44 additions and 48 deletions.
2 changes: 1 addition & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion peripheral.joystick/addon.xml.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<addon
id="peripheral.joystick"
version="20.0.0"
version="20.1.0"
name="Joystick Support"
provider-name="Team Kodi">
<requires>@ADDON_DEPENDS@</requires>
Expand All @@ -23,8 +23,10 @@
<summary lang="en_GB">Kodi Joystick Library</summary>
<summary lang="es_ES">Librería Kodi Joystick</summary>
<summary lang="es_MX">Biblioteca de Joysticks de Kodi</summary>
<summary lang="fr_FR">Bibliothèque de joystick Kodi</summary>
<summary lang="ko_KR">Kodi 조이스틱 라이브러리</summary>
<summary lang="pl_PL">Biblioteka joysticków Kodi</summary>
<summary lang="pt_BR">Biblioteca de Joystick do Kodi</summary>
<summary lang="ru_RU">Каталог джойстиков для Kodi</summary>
<summary lang="tr_TR">Kodi Oyun Çubuğu Kütüphanesi</summary>
<summary lang="zh_CN">Kodi 游戏杆库</summary>
Expand All @@ -36,6 +38,7 @@
<description lang="es_MX">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.</description>
<description lang="ko_KR">이 라이브러리는 조이스틱 드라이버와 버튼 맵을 제공합니다. DirectX, XInput, SDL 및 Linux Joystick API를 비롯한 여러 조이스틱 API가 지원됩니다.</description>
<description lang="pl_PL">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.</description>
<description lang="pt_BR">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.</description>
<description lang="ru_RU">Этот каталог предоставляет драйверы джойстиков и схемы расположения кнопок. Поддерживается несколько API джойстиков, включая DirectX, XInput, SDL и Linux Joystick API.</description>
<description lang="tr_TR">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.</description>
<description lang="zh_CN">此库提供游戏杆驱动程序和按钮图。支持多个游戏杆 API,包括 DirectX、XInput、SDL 和 Linux 游戏杆 API。</description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,65 +5,66 @@
msgid ""
msgstr ""
"Project-Id-Version: peripheral.joystick\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2016-12-06 21:53i\n"
"PO-Revision-Date: 2021-05-23 08:29+0000\n"
"Last-Translator: Christian Gade <[email protected]>\n"
"PO-Revision-Date: 2021-11-23 14:47+0000\n"
"Last-Translator: Édouard Duliège <[email protected]>\n"
"Language-Team: French (France) <https://kodi.weblate.cloud/projects/kodi-add-ons-peripherals/peripheral-joystick/fr_fr/>\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"
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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,65 +5,65 @@
msgid ""
msgstr ""
"Project-Id-Version: peripheral.joystick\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2016-12-06 21:53i\n"
"PO-Revision-Date: 2021-05-23 08:29+0000\n"
"Last-Translator: Christian Gade <gade@kodi.tv>\n"
"PO-Revision-Date: 2021-12-08 01:13+0000\n"
"Last-Translator: Fabio <fabioihle+kodi@alunos.utfpr.edu.br>\n"
"Language-Team: Portuguese (Brazil) <https://kodi.weblate.cloud/projects/kodi-add-ons-peripherals/peripheral-joystick/pt_br/>\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"
msgstr "Ajustes do driver"

msgctxt "#30001"
msgid "Joystick driver"
msgstr ""
msgstr "Driver de joystick"

msgctxt "#30002"
msgid "None"
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"
Expand Down
11 changes: 1 addition & 10 deletions src/addon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
3 changes: 1 addition & 2 deletions src/addon.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<std::shared_ptr<kodi::addon::Peripheral>>& scan_results) override;
Expand Down
4 changes: 3 additions & 1 deletion src/filesystem/DirectoryCache.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

#pragma once

#include "utils/CommonMacros.h"

#include <kodi/Filesystem.h>

#include <chrono>
Expand All @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/log/LogAddon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ CLogAddon::CLogAddon()

void CLogAddon::Log(SYS_LOG_LEVEL level, const char* logline)
{
AddonLog loglevel;
ADDON_LOG loglevel;

switch (level)
{
Expand Down
2 changes: 1 addition & 1 deletion src/settings/Settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
2 changes: 1 addition & 1 deletion src/settings/Settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions src/storage/JustABunchOfFiles.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/storage/xml/DatabaseXml.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit f19f6f8

Please sign in to comment.