diff --git a/idl/Windows.Xbox.Services.idl b/idl/Windows.Xbox.Services.idl new file mode 100644 index 0000000..33b4537 --- /dev/null +++ b/idl/Windows.Xbox.Services.idl @@ -0,0 +1,12 @@ +//All GUIDs came from "EmbeddedXvd/Windows/System32/config/SOFTWARE" and "appmodel.dll". +namespace Windows.Xbox.Services +{ + [interface_name("IXboxLiveConfiguration", fdeeeb27-66b0-465b-9dfb-99c62a62f7bc)] + [static_name("IXboxLiveConfigurationStatics", af86e2e0-b12d-4c6a-9c5a-d7aa65101e90)] + runtimeclass XboxLiveConfiguration + { + String TitleId { get; }; + String PrimaryServiceConfigId { get; }; + String SandboxId { get; }; + }; +}; \ No newline at end of file diff --git a/projects/WinDurango.WinRT/src/Windows/Xbox/Input/Windows.Xbox.Input.Controller.cpp b/projects/WinDurango.WinRT/src/Windows/Xbox/Input/Windows.Xbox.Input.Controller.cpp index 66bf858..71f6fce 100644 --- a/projects/WinDurango.WinRT/src/Windows/Xbox/Input/Windows.Xbox.Input.Controller.cpp +++ b/projects/WinDurango.WinRT/src/Windows/Xbox/Input/Windows.Xbox.Input.Controller.cpp @@ -1,4 +1,5 @@ #include "Windows.Xbox.Input.Controller.h" +#include "Windows.Xbox.Input.Gamepad.h" #include "WinDurangoWinRT.h" namespace winrt::Windows::Xbox::Input::implementation @@ -30,8 +31,14 @@ namespace winrt::Windows::Xbox::Input::implementation winrt::Windows::Foundation::Collections::IVectorView Controller::Controllers() { - p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::Input", "Unimplemented: Controllers"); - throw hresult_not_implemented(); + auto vector = winrt::single_threaded_vector(); + + for (auto const &gamepad : Gamepad::Gamepads()) + { + vector.Append(gamepad.as()); + } + + return vector.GetView(); } winrt::event_token Controller::ControllerAdded(winrt::Windows::Foundation::EventHandler const& handler) @@ -99,8 +106,7 @@ namespace winrt::Windows::Xbox::Input::implementation hstring Controller::Type() { - p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::Input", "Unimplemented: Type"); - throw hresult_not_implemented(); + return L""; } winrt::Windows::Xbox::System::User Controller::User() diff --git a/projects/WinDurango.WinRT/src/Windows/Xbox/Input/Windows.Xbox.Input.Gamepad.cpp b/projects/WinDurango.WinRT/src/Windows/Xbox/Input/Windows.Xbox.Input.Gamepad.cpp index 13dc8d7..f36963e 100644 --- a/projects/WinDurango.WinRT/src/Windows/Xbox/Input/Windows.Xbox.Input.Gamepad.cpp +++ b/projects/WinDurango.WinRT/src/Windows/Xbox/Input/Windows.Xbox.Input.Gamepad.cpp @@ -174,8 +174,7 @@ namespace winrt::Windows::Xbox::Input::implementation hstring Gamepad::Type() { - p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::Input", "Unimplemented: Type"); - throw hresult_not_implemented(); + return L""; } winrt::Windows::Xbox::System::User Gamepad::User()