microsoft / gdk Goto Github PK
View Code? Open in Web Editor NEWMicrosoft Public GDK
Home Page: http://aka.ms/gamedevdocs
License: Other
Microsoft Public GDK
Home Page: http://aka.ms/gamedevdocs
License: Other
Need to start getting public release notes added to the releases page.
In Input Fundamentals the documentation states that applications using the GameInput API can only receive input while the application is in focus.
However, in GameInputFocusPolicy the documentation states that this can be configured and that, by default, input is sent to the application regardless of focus. This matches the behaviour of the legacy APIs GameInput is unifying such as Raw Input and HID.
Calling GetCurrentReading and checking the timestamp shows that it's the same reading over and over again. I can't get fresh readings.
public static string GetReading()
{
IntPtr readingComPtr = InteropGameInput.GetCurrentReading(InputKind.Mouse, IntPtr.Zero);
IGameInputReading reading = (IGameInputReading)Marshal.GetObjectForIUnknown(readingComPtr);
ulong t = reading.GetTimestamp();
string result = readingComPtr.ToString() + " | " + t.ToString();
Marshal.FinalReleaseComObject(reading);
return result;
}
Input.Create | result = S_OK
Input.Time readingCmpPtr | reading.Time
547322007323 2074475510032 | 547321957562
547322042057 2074475506032 | 547321957562
547322076200 2074475509392 | 547321957562
547322110489 2074475506752 | 547321957562
547322144683 2074475510112 | 547321957562
547322178827 2074475509232 | 547321957562
The ref count for reading is zero. How can I be getting the same reading repeatedly, if it's being destroyed every frame?
Found In: June 2021 GDK Update 1
The GDK and GDKX installers will normally install the latest version of the Microsoft Gaming Services, but in some cases this may fail, resulting in the Gaming Services not being present on your device.
This will result in an “Ensure GamingServices is up to date” error when trying to launch or debug a Game Core PC game or dependent app, or other errors related to this being missing. This is a known bug in recent versions of Windows that has a fix and workaround described in the following article: https://support.microsoft.com/en-us/topic/kb5004327-error-0x80073d26-or-0x8007139f-occurs-when-you-install-or-start-gaming-services-on-a-windows-10-device-a0a281bd-9b0d-4aa0-8c10-56f1bf9953af
When applying the workaround, please ensure that the sandbox for the device is set to RETAIL (xblpcsandbox.exe RETAIL) and that a retail Microsoft Account is signed in on both the Xbox app and the Microsoft Store app, otherwise the Gaming Services install may not be queued.
The installation script {Installers/InstallGamingServicesBundle.ps1) isn't signed.
The following APIs aren’t yet implemented in GameInput. They'll be available in a future update.
No matter what controller I try (XBox One, XBox 360, a non-Microsoft gamepad) - the data returned by IGameInputDevice::GetDeviceInfo
is always incomplete.
For one thing, displayName
and deviceString
are always set to zero:
Is the GDK as a whole even meant to be used on Windows at this point? I feel like I'm in a Microsoft-internal repo. All the unimplemented functions don't help.
Issue
The upcoming release of Visual Studio 2022 will provide several benefits to game developers, including a more scalable 64-bit IDE and an improved debugger architecture, among other key features. The October 2021 version of the GDK includes a preview of Visual Studio 2022 support.
Workaround (Updated 2022.03.10)
Visual Studio 2022 .VSIX Installers Paired with Every Release
Assign a listener to the RawGameController.RawGameControllerRemoved event.
Upon firing the even try to find the controller in the std::vector of controls you stored away. You will find no match since the controller provided in the RawGameControllerRemoved event is broken and does not match anymore the one you added in RawGameControllerAdded. It is as if the operator==() is not working making it impossible to match the controller.
As a result RawGameController can be added when attached to the system but never removed causing broken controller instances to pile up in your application.
Issue
When adding a new MicrosoftGame.config file to a Visual Studio project by using the item template, the new file might have its Item Type property set to "Does not participate in build". The correct Item Type should be "Microsoft Game Config".
Workaround
To set the correct Item Type, right-click the new MicrosoftGame.config file in Solution Explorer to open its property page.
Howdy!
I'm 41 years old. I'm roughly 3 years older than the announcement of Windows. And 5 years older than the first release.
I think the README is off by a decade maybe? :D
Right now, building stuff w/ VS2022 installed throws an error complaining error MSB8020: The build tools for v143 (Platform Toolset = 'v143') cannot be found
Issue
If you manually installed the Visual Studio 2022 .vsix files that shipped alongside the October 2021 GDK, uninstall those files before you install the March 2022 GDK.
Impact
Not doing this can produce debugging and deployment failures when using Visual Studio 2022.
Solution:
Use the following command-line commands to uninstall the October 2021 GDK .vsix files:
Note: This command might vary depending on which edition of Visual Studio 2022 is installed and which .vsix files were initially installed.
If the March 2022 GDK was installed prior to uninstalling the October 2021 GDK .vsix files, repair the March 2022 GDK after uninstalling the October 2021 .vsix files to get back into a working state.
Hello everyone!
In out application for XBOX series X we have two threads. First thread does a lot of asynchronous file read operations. Size of most files about 1 KB. At same time second thread call RemoveDirectoryW() function several times and sometime this function fails. GetLastError() returns 0x1f (ERROR_GEN_FAILURE). It looks like system or disk can't process this remove request, because there are a lot of ansync reads at first thread. Is it known issue? And is there any workaround?
With best regards,
Alexey.
First of all, it's fantastic to see the new GDK finally here! However, I'm slightly confused about its use with middleware and ID@Xbox.
Developers using Unity can't get a build that GDK will accept without a module for Xbox One. However, Unity developers cannot access the module without the go-ahead from the ID@Xbox team. The requirements for ID@Xbox basically require things from the GDK to receive the go-ahead.
Am I missing something here or is there currently a lack of documentation?
People are saying it's not intended for. But, what if I do?
**As of the March 2022 GDK, MicrosoftGame.config has been updated to schema version 1 (Game
configVersion="1") for new titles. **
Change 1 of 3 - Updated requirements for MSAAppId and TitleId
Change 2 of 3 - Deprecation of Mod & Package Virtualization elements in MicrosoftGame.config
Change 3 of 3 - Updates to the MicrosoftGame.config Editor to handle new schema and element requirements.
Found In: June 2021 GDK Update 1
Condition | Solution |
---|---|
If the Universal Windows Platform development workload is installed... | Expand it and then clear the optional component named .NET Core 2.1 SDK. |
If the Data storage and processing workload is installed... | Expand it and then clear the optional component named .NET Core 2.1 SDK. |
If the Office/SharePoint development workload is installed... | Expand it and then clear the optional component named .NET Core 2.1 SDK. |
If the Python development workload is installed... | Expand it and then clear the optional component named .NET Core 2.1 SDK. |
If the .NET desktop development workload is installed... | Expand it and then clear the optional component named .NET Core 2.1 development tools. |
If the ASP.NET and web development workload is installed... | Expand it and then clear the optional component named .NET Core 2.1 development tools. |
If the Azure development workload is installed... | Expand it and then clear the optional component named .NET Core 2.1 development tools. |
If the .NET Core cross-platform development workload is installed... | Remove it. |
For more information about this blocking issue, see the .NET Core 2.1 end of support notification.
Ever since I'm using my laptop more often, it freezes permanently every few days, with the last event mentioned in the Reliability History and Event logs being something about installing, updating or reconfiguring Microsoft GameInput
10.1.22621.3036
(whose redist one can find in this repository).
It's not like MS doesn't know about it. I found literally thousands of complaints going back to 2020.. It is all part of Microsoft's "Gaming Services". Be glad you are getting only a mention in reliability monitor as many report freezes, restarts, and even BSOD relating to this. (From what I can tell, these more critical reports are from gamers whose game depends on GameInput to run.)
source: https://www.elevenforum.com/t/daily-gameinput-reconfiguration.7496/post-167878
So what's wrong with this whole thing?
Add or Remove Programs
?I just spent some €300 for priority support in sorting this problem (after contacting MS Support twice and twice they fcked up my system while following the usual "run sfc, disable services etc" script) - I'm still waiting for a reply since a few days.
PS: If it helps, I downloaded and ran the redist manually, it didn't seem to do anything, nor cause a freeze.
Issue
When a new MicrosoftGame.config file is added to a Visual Studio project for the first time, it doesn’t immediately appear in Xbox Gaming Project Control.
Workaround
Your Visual Studio project must be closed and reopened for the new file to appear. Note that this only occurs for the first file that you add. Subsequent files immediately appear in Xbox Gaming Project Control.
Are the PC Samples really meant to be closed? https://docs.microsoft.com/en-us/gaming/gdk/_content/gc/get-started-with-pc-dev/running-samples/running-samples-pc
Without the samples, I'm finding it hard to be interested on learning how to use the GDK.
XGameRuntimeFeature
currently has no enum case to indicate the number of fields, this requires hardcoding a 22 into an array length which is suboptimal when updating if new features are added to this enum.
Since a few days installing GDK on our Azure Pipelines CI machines fails with an error:
[2022-02-06T10:39:10]i305: Verified acquired payload: package_MicrosoftGRDKx86Common_x86_en_us at path: C:\ProgramData\Package Cache\.unverified\package_MicrosoftGRDKx86Common_x86_en_us, moving to: C:\ProgramData\Package Cache\{00682A0F-F4CF-7141-E845-F371B339C9EB}v10.1.22000.1969\Installers\Microsoft GRDK x86 Common-x86_en-us.msi.
[2022-02-06T10:39:10]i338: Acquiring package: package_MicrosoftGRDKx86Common_x86_en_us, payload: pay55F24AFDCB65F8CCF2DB13F229DA19BA, copy from: D:\a\1\s\gdk-extract\GDK-October_2021_Republish\Installers\29ed3e615b33e5f98eeb2dc2ff475882.cab
[2022-02-06T10:39:10]e000: Error 0x80091007: Hash mismatch for path: C:\ProgramData\Package Cache\.unverified\pay55F24AFDCB65F8CCF2DB13F229DA19BA, expected: CE0266367A39A15902E5EAC8702ED1AC2481A20B, actual: 527D32C94D9801DDEDC1AE833248D1459A82A625
[2022-02-06T10:39:10]e000: Error 0x80091007: Failed to verify hash of payload: pay55F24AFDCB65F8CCF2DB13F229DA19BA
[2022-02-06T10:39:10]e310: Failed to verify payload: pay55F24AFDCB65F8CCF2DB13F229DA19BA at path: C:\ProgramData\Package Cache\.unverified\pay55F24AFDCB65F8CCF2DB13F229DA19BA, error: 0x80091007. Deleting file.
[2022-02-06T10:39:10]e000: Error 0x80091007: Failed to cache payload: pay55F24AFDCB65F8CCF2DB13F229DA19BA
[2022-02-06T10:39:10]i000: ERROR: Failed to verify the integrity of payload
Full log:
Microsoft Game Development Kit___211000_(October_2021)_20220206103628.log
The README contains a link to help getting started with a development environment. It contains the following link
https://review.docs.microsoft.com/en-us/gaming/gdk/_content/gc/getstarted/dev-pc-setup?branch=main
However this link requires one to login. When I login with my personal Microsoft account I'm met with a 403 Forbidden error.
What are the requirements for accessing this link? Isn't the GDK supposed to be free for anyone to learn now?
Hoping to hear back soon.
Does GameInput support the USB Xbox(360) controller? The controllers work fine with XInput, which I am going try and use sxs in code. Also, XGameRuntimeInitialize returns (0x87e5001f), which apparently is not considered failed FAILED(hr). By chance, can you point me to a sample in the Windows-Driver-Samples so that I can use as a baseline to create my own for the controllers?
The error code documentation suggests this error code is defined in XGameErr.h, It appears to be missing.
Hi,
I've spent a couple of hours trying to make GameInput work in a plain Windows 10 Win32 (C++) app, configured via CMake. Including the GameInput.h
header, compiling, and linking the executable all work as expected. There are no runtime errors. However, the IGameInput
singleton does not provide any meaningful readings. Only one device exists, which is completely dead (no key, mouse, gamepad, or other kind of data is accessible). My code is as close to the examples available in the documentation as possible. My hardware is connected properly, drivers up-to-date, and everything else Windows-related is completely functional.
I have also tried building it as a Terminal application (plain int main()
entry point, using std::cout
to display read data), with limited success. Contrary to the Win32 attempt, my keyboard, mouse, and gamepad (Xbox One S Wireless Controller) are recognized by GameInput and I can detect pressed keys/buttons, mouse movement, etc. However, this behaviour is extremely inconsistent. For example, the mouse interface stops working after a few seconds (appears to be connected, but GetCurrentReading()
always fetches the same IGameInputReading
instance). What's worse is that after a system reboot, the code broke in a similar manner to the Win32 test. No code changes, no recompiles, simply a reboot.
I've also tried re-installing the entire GDK (I am using the latest version), to no avail. I cannot find any insight that might help me because most example projects are locked behind an NDA. As such, I hope to find some advice here.
hi,
Issue
Visual Studio 2019 version 16.4 is out of support as of October 2021.
Workaround
Please move to Visual Studio 2019 version 16.7, 16.9, or 16.11 for continued servicing and support. A future GDK release will generate a build error with Visual Studio 2019 version 16.0–16.6—the GDK currently generates a build error if versions 16.0–16.3 are in use.
Note: The GDK continues to support using Visual Studio 2017 version 15.9.
For more information, see Visual Studio Product Lifecycle and Servicing | Microsoft Docs.
HRESULT result = GameInputCreate(game_input.GetAddressOf());
game_input->SetFocusPolicy(GameInputDisableBackgroundInput);
The above code results in input still being reported through
game_input->GetCurrentReading(GameInputKindGamepad, gamepad.Get(), &reading))
This is not the expected behavior. The documentation states that GameInput should receive "at-rest" values when background input is disabled here, but it does not respect the current FocusPolicy.
Related issue with the SetFocusPolicy
documentation: #26
OS Name: Microsoft Windows 10 Pro
Version 10.0.19044 Build 19044
Hardware Abstraction Layer Version = "10.0.19041.1806"
GDK June 2022 Update 2
Hi, I'm working on a PC game.
Just done a clean installation of the GDK but XInputOnGameInput.h is nowhere to be found. I'd expect it to be next to GameInput.h?
According to the official doc it should be there, or am I missing something?
SDL currently has a PR that adds a CI test for Windows GDK...
... but it's currently being blocked by the build time, which is currently 25 minutes! 23 of those 25 minutes are the installer:
https://github.com/libsdl-org/SDL/actions/runs/7536289619/job/20513496746?pr=8847
The workflow currently uses the install scripts in this repo. Is there a way to strip down the install process to what's needed to compile and link GDK binaries and nothing else? Some of the *BSDs currently in CI take ~10 minutes, so even cutting the time in half would probably be enough to merge this in.
Issue
When adding a new MicrosoftGame.config file to a Visual Studio project by using the item template, any file names entered that don’t have a ".config" extension will have their file extensions replaced with ".config". For example, if a file named MicrosoftGame_profile.txt is added by using the item template, the resulting file name is MicrosoftGame_profile.config.
Workaround
You can change the file name by using Visual Studio Solution Explorer.
If I make a build with the sign-in scene immediately after having imported this, I successfully get the sign-in prompt on start. However none of my sandbox test accounts work, which isn't particularly surprising.
However, when I run the tool under 'GDK > Associate with the Microsoft Store' (which seems to work successfully and fills out MicrosoftGame.Config with all the correct information) and set the field 'Scid' in the GdkHelper prefab, suddenly the sign-in prompt never even appears in the build. There are no errors, and nothing else has been changed.
Issue*
The file format for PIX Timing Captures has been updated since the June 2021 GDK. An error is displayed when opening captures that were taken with the June 2021, or earlier, GDKs.
Workaround
Use the Convert menu in PIX to open these older captures in the version of PIX that ships in the October 2021 GDK.
The deviceId and deviceRootId are returning the same hash value.
Xbox Wireless Adapter for Windows 10:
Display Name: Xbox Wireless Adapter for Windows
Device Instance Path: USB\VID_045E&PID_02FE\200142
Driver Version: 1.0.46.1
Gamepad:
Model No: 1914 (QAS-00003) - Xbox Wireless Controller - Robot White
Display Name: XINPUT compatible HID device
Device Instance Path: HID\VID_045E&PID_0B12&IG_00\7&1E02870D&10&0000
Driver Version: 10.0.19041.3031
Product Name: Controller (Xbox One For Windows)
Instance Guid: {170c5400-59e9-11ee-8001-444553540000}
Vendor Id: 1118
Product Id: 2834
Environment information:
Edition: Windows 10 Pro
Version: 22H2
Installed on: 9/01/2022
OS build: 19045.3448
Experience: Windows Feature Experience Pack 1000.19044.1000.0
Running PGDK.exe with the latest commit fail to install the October update. It looks like it was not updated with packages - it is left from June version
For PC development, the latest versions of the DirectX 12 headers are available in the Agility SDK. They are newer than the headers in the Windows 10 SDK (20348) and provide updated DirectX12 Runtime for earlier versions of Windows, back to version 18363.
GameInput appears to stop working on the target machine when any user remote desktops to it, even after the remote session is disconnected, until the affected machine is rebooted. This can be reproduced as follows:
Workaround
To instrument your Windows PC title with PIX events, you must use the following steps:
GameInputKind documentation is not consistent with the header file
I was hoping to issue a PR to correct it, but there's no option to?
The GameInput.h
relevant enum is this:
typedef enum GameInputKind
{
GameInputKindUnknown = 0x00000000,
GameInputKindRawDeviceReport = 0x00000001,
GameInputKindControllerAxis = 0x00000002,
GameInputKindControllerButton = 0x00000004,
GameInputKindControllerSwitch = 0x00000008,
GameInputKindController = 0x0000000E,
GameInputKindKeyboard = 0x00000010,
GameInputKindMouse = 0x00000020,
GameInputKindTouch = 0x00000100,
GameInputKindMotion = 0x00001000,
GameInputKindArcadeStick = 0x00010000,
GameInputKindFlightStick = 0x00020000,
GameInputKindGamepad = 0x00040000,
GameInputKindRacingWheel = 0x00080000,
GameInputKindUiNavigation = 0x01000000,
GameInputKindAny = 0x0FFFFFFF
} GameInputKind;
Can someone with appropriate auth and access double-check the docs against the header file and correct as needed?
Thanks
I encountered an issue with GameInput while using an Xbox 360 Controller connected via a Wireless Receiver Dongle (I haven't tested it with a cable). The problem is that GameInput correctly detects that the gamepad is connected, but it fails to update the gamepad state, resulting in no input being registered. The vibration feature still works properly.
Furthermore, on one of my PCs, after connecting the Xbox 360 Controller just once, GameInput continuously displays that the gamepad is connected, even when it's physically disconnected and the Wireless Receiver Dongle is unplugged from the computer. I have to restart the GameInput Service to start working normally. It's worth noting that the Xbox Series X controller works flawlessly with GameInput.
Any assistance or suggestions on resolving this issue would be greatly appreciated.
Breaking Change
In the March 2022 GDK, MSIXVC package installations are now laid out as flat files.
It doesn't seem like the tool should be GDKX exclusive.
XAudio2 supports both ADPCM and xWMA for Windows, and ADPCMEncode.exe is already included with GDK.
PC games use the format all the time. Even games from Microsoft have used the format on PC.
Also, xWMAEncode.exe was previously (and is currently) available freely anyway, via the old DirectX SDK.
XAudio2 with xWMA support is used in several example projects across Microsoft's repositories.
It's confusing that the ability to encode it can only be done freely through an unsupported legacy SDK.
(This was my experience.)
Perhaps something should be done about this?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.