project-gameface icon indicating copy to clipboard operation
project-gameface copied to clipboard

Improve Profile System

Open acidcoke opened this issue 1 year ago • 1 comments

While using Gameface I thought that using profiles for different games/programs would be a very useful feature. As it turns out, a profile system is already implemented and working! Just the button to get to the profile switches needs a rework/redesign. Which is probably the reason it is commented out in the main GUI.

Another thing that irked me was the fact that profiles must not include spaces. This is only done because the profile name is saved as the profiles folder name and having folder names with spaces is a thing you want to avoid.

I propose that we uncouple the profile name from the directory name. Maybe we could change the directory name to a hash or some kind of id. Also, I'd create another config file for every profile. We could call this profile.json. This would obviously contain an entry for the profile name. But I would also include the general settings for the camera that currently are included in cursor.json.

My second idea is to build a Context detector/setting where you can select the programs you want to activate the profile for. I'd also put this setting in profile.json

How does this sound?

acidcoke avatar Jun 15 '23 19:06 acidcoke

I totally vote for all of that - particularly a context detector. Thats going to be fun to do though

(An aside really - I'm really worried about pyautogui library being used. That would be what you'd naturally use but that library has a TON of issues and, I could be wrong, but I have a sneaky feeling its what is causing the no cursor movement for some people.. I'd personally vote just going for ctypes e.g.

import ctypes
from ctypes import wintypes

user32 = ctypes.windll.user32

h_wnd = user32.GetForegroundWindow()
pid = wintypes.DWORD()
user32.GetWindowThreadProcessId(h_wnd, ctypes.byref(pid))
print(pid.value)

)

willwade avatar Jun 29 '23 05:06 willwade