GDK and C# #60
Replies: 3 comments 2 replies
-
I've go the XGamingRuntimeSDK solution going. But there are a few problems with the project. The first change seems innocent enough, the api has changed since that solution was written, and I had to remove a couple of arguments.... XboxLiveForm.cs --------------------------------- Line 188, change to:
There are two more errors...
Commenting out the two lines might be OK and just letting the conditional block run? The app runs and I can initialize XGameRuntime but is something else meant to be available?
|
Beta Was this translation helpful? Give feedback.
-
Some clarification on the documentation would be good as well. GameInput is the API I'm particularly after at the moment. But there is a contradiction. Here https://learn.microsoft.com/en-us/gaming/gdk/_content/gc/getstarted/overviews/sdk-and-tools under windows software development kit there is dot-point:
But over here... https://learn.microsoft.com/en-us/gaming/gdk/_content/gc/input/overviews/input-overview?source=docs It says ... PC support (including earlier versions of Windows) will be available in an upcoming Windows SDK. What is the status of GamingInput ? Has it been provided in Windows AppSDK ? And I should ask, but I have a sinking feeling, I won't like the answer. Is the GamingInput API available for C#? |
Beta Was this translation helpful? Give feedback.
-
So I think I've made some progress. I'm trying to wrap the GameInput API's but when I call GetCurrentReading, the reading is always null and I get strange returns as the hresult or int error code...
This number will increase each time I run it. It looks like it's just a counter. I just don't understand what's happening, what I'm doing wrong or what I'm meant to see in hresult, or when the reading will be not-null. My calling code is IGameInputReading reading;
int result = COM_GameInput.GetCurrentReading(
GameInputKind.GameInputKindGamepad,
null,
out reading); And my IGameInput wrapper is.. [ComImport]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[Guid("11BE2A7E-4254-445A-9C09-FFC40F006918")]
public interface IGameInput
{
[PreserveSig]
public int GetCurrentReading(
GameInputKind inputKind,
IGameInputDevice? device,
out IGameInputReading reading);
} |
Beta Was this translation helpful? Give feedback.
-
I've come here, because I was told and have read that GDK is the best way to access various services, importantly for me at the moment, Mouse Input. I've run into problems with Win32 mouse functionality, it's a complicated system that is fragmented and antiquated is made up of stack after stack after stack, with each fixing issues with the previous stack. I was using basic windows messages, then I had to introduce raw-input because windows messages wouldn't provide delta's in all cases, now I have to change again because raw-input can't handle high report rates for gaming mice. I'm now reading up on GetRawInputBuffer. It seems like every time I ask something different of a given API, it breaks and I have to use a different API for improved functionality. It's pretty tiresome.
I have installed the Microsoft.GDK.PC.230300 nuget package. But I don't know how to use it. I don't see any namespaces available. How do we use it?
I tried
But the namespace isn't found. Is that for Unity only? Why Unity only? Can you provide this for use outside of Unity? Is it possible to use CsWin32 to get access to the GDK API?
I have found this page...
https://learn.microsoft.com/en-us/gaming/gdk/_content/gc/get-started-with-pc-dev/get-started-with-custom-engine/gc-get-started-with-custom-engine-pc-csharp
I'll read through that, hoping to find some pathway.
Beta Was this translation helpful? Give feedback.
All reactions