Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recognize new names for Xbox Console Companion #170

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Ignefolio
Copy link

Uses process id to find the name of the running process executable.
e.g.
C:\Program Files\WindowsApps\Microsoft.XboxApp_48.54.3003.0_x64__8wekyb3d8bbwe\XboxApp.exe

and relies for detection on the name of the executable(this should be the same in any language)

feel free to check for your self.

@shrek88
Copy link

shrek88 commented Jun 21, 2019

is there anyway to test yr changes?

@Ignefolio
Copy link
Author

You can check out the code here https://github.com/Ignefolio/XboxKeyboardMous and run it in Visual Studio.

Copy link
Collaborator

@DavidRieman DavidRieman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Finally tested this locally. One crash to address so far.


var name = UWPUtils.GetProcessName(handle);

if (!name.EndsWith("XboxApp.exe") && started)
Copy link
Collaborator

@DavidRieman DavidRieman Jun 29, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sometimes, while switching between applications/windows, GetForegroundWindow can return a handle of 0. GetProcessName then returns null, and the following null.EndsWith crashes the application. We need null safety on name, and should probably skip the GetProcessName work when handle is 0 as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants