win-capture: Change error message for file mapping
If shared memory file mapping fails, I've found that it's somewhat normal due to something in windows -- usually the capture will always eventually start up after a few tries. Only seems to apply to some games though, for example seems to happen with counterstrike a lot for some strange reason. Capture always eventually starts back up though. I remember seeing this with OBS1 as well in many cases but always thought it was some sort of flukemaster
parent
c1289b893e
commit
0f09834c68
|
@ -817,8 +817,15 @@ static inline bool init_capture_data(struct game_capture *gc)
|
|||
|
||||
gc->hook_data_map = OpenFileMappingA(FILE_MAP_ALL_ACCESS, false, name);
|
||||
if (!gc->hook_data_map) {
|
||||
warn("init_capture_data: failed to open file mapping: %lu",
|
||||
GetLastError());
|
||||
DWORD error = GetLastError();
|
||||
if (error == 2) {
|
||||
info("init_capture_data: file mapping not found, "
|
||||
"retrying. (this is often normal, and may take "
|
||||
"a few tries)");
|
||||
} else {
|
||||
warn("init_capture_data: failed to open file "
|
||||
"mapping: %lu", error);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue