(API Change) obs_reset_video: Use return codes
Changed API functions: libobs: obs_reset_video Before, video initialization returned a boolean, but "failed" is too little information, if it fails due to lack of device capabilities or bad video device parameters, the front-end needs to know that. The OBS Basic UI has also been updated to reflect this API change.
This commit is contained in:
@@ -55,7 +55,7 @@ static void CreateOBS(NSView *view)
|
||||
ovi.window_height = cy;
|
||||
ovi.window.view = view;
|
||||
|
||||
if (!obs_reset_video(&ovi))
|
||||
if (obs_reset_video(&ovi) != 0)
|
||||
throw "Couldn't initialize video";
|
||||
}
|
||||
|
||||
|
@@ -88,7 +88,7 @@ static void CreateOBS(HWND hwnd)
|
||||
ovi.output_height = rc.bottom;
|
||||
ovi.window.hwnd = hwnd;
|
||||
|
||||
if (!obs_reset_video(&ovi))
|
||||
if (obs_reset_video(&ovi) != 0)
|
||||
throw "Couldn't initialize video";
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user