win-capture: Use PROCESS_QUERY_INFORMATION for game capture

PROCESS_QUERY_LIMITED_INFORMATION might be a bit insufficient for what
we need to do.
This commit is contained in:
jp9000 2017-06-19 16:02:02 -07:00
parent 1ca9f8872e
commit 603825ee39

View File

@ -622,7 +622,7 @@ static inline bool is_64bit_process(HANDLE process)
static inline bool open_target_process(struct game_capture *gc)
{
gc->target_process = open_process(
PROCESS_QUERY_LIMITED_INFORMATION,
PROCESS_QUERY_INFORMATION | SYNCHRONIZE,
false, gc->process_id);
if (!gc->target_process) {
warn("could not open process: %s", gc->config.executable);
@ -1013,7 +1013,7 @@ static void setup_window(struct game_capture *gc, HWND window)
GetWindowThreadProcessId(window, &gc->process_id);
if (gc->process_id) {
process = open_process(PROCESS_QUERY_LIMITED_INFORMATION,
process = open_process(PROCESS_QUERY_INFORMATION,
false, gc->process_id);
if (process) {
gc->is_app = is_app(process);