mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-01 23:48:29 +00:00
Use SDL_bool instead an int return code in the SDL API
Most SDL functions used to indicate success or failure using an int return code. These functions have been changed to return SDL_bool. Here is a coccinelle patch to change code that previously compared the return value to 0 and changes it to a boolean test: @ bool_return_type @ identifier func =~ "^(SDL_AddEventWatch|SDL_AddHintCallback|SDL_AddSurfaceAlternateImage|SDL_AddVulkanRenderSemaphores|SDL_BindAudioStream|SDL_BindAudioStreams|SDL_BlitSurface|SDL_BlitSurface9Grid|SDL_BlitSurfaceScaled|SDL_BlitSurfaceTiled|SDL_BlitSurfaceTiledWithScale|SDL_BlitSurfaceUnchecked|SDL_BlitSurfaceUncheckedScaled|SDL_CaptureMouse|SDL_ClearAudioStream|SDL_ClearClipboardData|SDL_ClearComposition|SDL_ClearError|SDL_ClearProperty|SDL_ClearSurface|SDL_CloseIO|SDL_CloseStorage|SDL_ConvertAudioSamples|SDL_ConvertEventToRenderCoordinates|SDL_ConvertPixels|SDL_ConvertPixelsAndColorspace|SDL_CopyFile|SDL_CopyProperties|SDL_CopyStorageFile|SDL_CreateDirectory|SDL_CreateStorageDirectory|SDL_CreateWindowAndRenderer|SDL_DateTimeToTime|SDL_DestroyWindowSurface|SDL_DetachVirtualJoystick|SDL_DisableScreenSaver|SDL_EnableScreenSaver|SDL_EnumerateDirectory|SDL_EnumerateProperties|SDL_EnumerateStorageDirectory|SDL_FillSurfaceRect|SDL_FillSurfaceRects|SDL_FlashWindow|SDL_FlipSurface|SDL_FlushAudioStream|SDL_FlushRenderer|SDL_GL_DestroyContext|SDL_GL_GetAttribute|SDL_GL_GetSwapInterval|SDL_GL_LoadLibrary|SDL_GL_MakeCurrent|SDL_GL_SetAttribute|SDL_GL_SetSwapInterval|SDL_GL_SwapWindow|SDL_GetAudioDeviceFormat|SDL_GetAudioStreamFormat|SDL_GetCameraFormat|SDL_GetClosestFullscreenDisplayMode|SDL_GetCurrentRenderOutputSize|SDL_GetCurrentTime|SDL_GetDXGIOutputInfo|SDL_GetDateTimeLocalePreferences|SDL_GetDisplayBounds|SDL_GetDisplayUsableBounds|SDL_GetGDKDefaultUser|SDL_GetGDKTaskQueue|SDL_GetGamepadSensorData|SDL_GetGamepadTouchpadFinger|SDL_GetHapticEffectStatus|SDL_GetJoystickBall|SDL_GetMasksForPixelFormat|SDL_GetPathInfo|SDL_GetRectUnion|SDL_GetRectUnionFloat|SDL_GetRenderClipRect|SDL_GetRenderColorScale|SDL_GetRenderDrawBlendMode|SDL_GetRenderDrawColor|SDL_GetRenderDrawColorFloat|SDL_GetRenderLogicalPresentation|SDL_GetRenderLogicalPresentationRect|SDL_GetRenderOutputSize|SDL_GetRenderSafeArea|SDL_GetRenderScale|SDL_GetRenderVSync|SDL_GetRenderViewport|SDL_GetSensorData|SDL_GetStorageFileSize|SDL_GetStoragePathInfo|SDL_GetSurfaceAlphaMod|SDL_GetSurfaceBlendMode|SDL_GetSurfaceClipRect|SDL_GetSurfaceColorKey|SDL_GetSurfaceColorMod|SDL_GetTextInputArea|SDL_GetTextureAlphaMod|SDL_GetTextureAlphaModFloat|SDL_GetTextureBlendMode|SDL_GetTextureColorMod|SDL_GetTextureColorModFloat|SDL_GetTextureScaleMode|SDL_GetTextureSize|SDL_GetWindowAspectRatio|SDL_GetWindowBordersSize|SDL_GetWindowMaximumSize|SDL_GetWindowMinimumSize|SDL_GetWindowPosition|SDL_GetWindowRelativeMouseMode|SDL_GetWindowSafeArea|SDL_GetWindowSize|SDL_GetWindowSizeInPixels|SDL_GetWindowSurfaceVSync|SDL_HideCursor|SDL_HideWindow|SDL_Init|SDL_InitHapticRumble|SDL_InitSubSystem|SDL_LoadWAV|SDL_LoadWAV_IO|SDL_LockAudioStream|SDL_LockProperties|SDL_LockSurface|SDL_LockTexture|SDL_LockTextureToSurface|SDL_MaximizeWindow|SDL_MinimizeWindow|SDL_MixAudio|SDL_OpenURL|SDL_OutOfMemory|SDL_PauseAudioDevice|SDL_PauseAudioStreamDevice|SDL_PauseHaptic|SDL_PlayHapticRumble|SDL_PremultiplyAlpha|SDL_PremultiplySurfaceAlpha|SDL_PushEvent|SDL_PutAudioStreamData|SDL_RaiseWindow|SDL_ReadStorageFile|SDL_ReadSurfacePixel|SDL_ReadSurfacePixelFloat|SDL_RegisterApp|SDL_ReloadGamepadMappings|SDL_RemovePath|SDL_RemoveStoragePath|SDL_RemoveTimer|SDL_RenamePath|SDL_RenameStoragePath|SDL_RenderClear|SDL_RenderCoordinatesFromWindow|SDL_RenderCoordinatesToWindow|SDL_RenderFillRect|SDL_RenderFillRects|SDL_RenderGeometry|SDL_RenderGeometryRaw|SDL_RenderLine|SDL_RenderLines|SDL_RenderPoint|SDL_RenderPoints|SDL_RenderPresent|SDL_RenderRect|SDL_RenderRects|SDL_RenderTexture|SDL_RenderTexture9Grid|SDL_RenderTextureRotated|SDL_RenderTextureTiled|SDL_RequestAndroidPermission|SDL_RestoreWindow|SDL_ResumeAudioDevice|SDL_ResumeAudioStreamDevice|SDL_ResumeHaptic|SDL_RumbleGamepad|SDL_RumbleGamepadTriggers|SDL_RumbleJoystick|SDL_RumbleJoystickTriggers|SDL_RunHapticEffect|SDL_SaveBMP|SDL_SaveBMP_IO|SDL_SendAndroidMessage|SDL_SendGamepadEffect|SDL_SendJoystickEffect|SDL_SendJoystickVirtualSensorData|SDL_SetAppMetadata|SDL_SetAppMetadataProperty|SDL_SetAudioDeviceGain|SDL_SetAudioPostmixCallback|SDL_SetAudioStreamFormat|SDL_SetAudioStreamFrequencyRatio|SDL_SetAudioStreamGain|SDL_SetAudioStreamGetCallback|SDL_SetAudioStreamInputChannelMap|SDL_SetAudioStreamOutputChannelMap|SDL_SetAudioStreamPutCallback|SDL_SetBooleanProperty|SDL_SetClipboardData|SDL_SetClipboardText|SDL_SetCursor|SDL_SetFloatProperty|SDL_SetGamepadLED|SDL_SetGamepadMapping|SDL_SetGamepadPlayerIndex|SDL_SetGamepadSensorEnabled|SDL_SetHapticAutocenter|SDL_SetHapticGain|SDL_SetJoystickLED|SDL_SetJoystickPlayerIndex|SDL_SetJoystickVirtualAxis|SDL_SetJoystickVirtualBall|SDL_SetJoystickVirtualButton|SDL_SetJoystickVirtualHat|SDL_SetJoystickVirtualTouchpad|SDL_SetLinuxThreadPriority|SDL_SetLinuxThreadPriorityAndPolicy|SDL_SetLogPriorityPrefix|SDL_SetMemoryFunctions|SDL_SetNumberProperty|SDL_SetPaletteColors|SDL_SetPointerProperty|SDL_SetPointerPropertyWithCleanup|SDL_SetPrimarySelectionText|SDL_SetRenderClipRect|SDL_SetRenderColorScale|SDL_SetRenderDrawBlendMode|SDL_SetRenderDrawColor|SDL_SetRenderDrawColorFloat|SDL_SetRenderLogicalPresentation|SDL_SetRenderScale|SDL_SetRenderTarget|SDL_SetRenderVSync|SDL_SetRenderViewport|SDL_SetScancodeName|SDL_SetStringProperty|SDL_SetSurfaceAlphaMod|SDL_SetSurfaceBlendMode|SDL_SetSurfaceColorKey|SDL_SetSurfaceColorMod|SDL_SetSurfaceColorspace|SDL_SetSurfacePalette|SDL_SetSurfaceRLE|SDL_SetTLS|SDL_SetTextInputArea|SDL_SetTextureAlphaMod|SDL_SetTextureAlphaModFloat|SDL_SetTextureBlendMode|SDL_SetTextureColorMod|SDL_SetTextureColorModFloat|SDL_SetTextureScaleMode|SDL_SetThreadPriority|SDL_SetWindowAlwaysOnTop|SDL_SetWindowAspectRatio|SDL_SetWindowBordered|SDL_SetWindowFocusable|SDL_SetWindowFullscreen|SDL_SetWindowFullscreenMode|SDL_SetWindowHitTest|SDL_SetWindowIcon|SDL_SetWindowKeyboardGrab|SDL_SetWindowMaximumSize|SDL_SetWindowMinimumSize|SDL_SetWindowModalFor|SDL_SetWindowMouseGrab|SDL_SetWindowMouseRect|SDL_SetWindowOpacity|SDL_SetWindowPosition|SDL_SetWindowRelativeMouseMode|SDL_SetWindowResizable|SDL_SetWindowShape|SDL_SetWindowSize|SDL_SetWindowSurfaceVSync|SDL_SetWindowTitle|SDL_SetiOSAnimationCallback|SDL_ShowAndroidToast|SDL_ShowCursor|SDL_ShowMessageBox|SDL_ShowSimpleMessageBox|SDL_ShowWindow|SDL_ShowWindowSystemMenu|SDL_StartTextInput|SDL_StartTextInputWithProperties|SDL_StopHapticEffect|SDL_StopHapticEffects|SDL_StopHapticRumble|SDL_StopTextInput|SDL_SyncWindow|SDL_TimeToDateTime|SDL_TryLockMutex|SDL_TryLockRWLockForReading|SDL_TryLockRWLockForWriting|SDL_TryWaitSemaphore|SDL_UnlockAudioStream|SDL_UpdateHapticEffect|SDL_UpdateNVTexture|SDL_UpdateTexture|SDL_UpdateWindowSurface|SDL_UpdateWindowSurfaceRects|SDL_UpdateYUVTexture|SDL_Vulkan_CreateSurface|SDL_Vulkan_LoadLibrary|SDL_WaitConditionTimeout|SDL_WaitSemaphoreTimeout|SDL_WarpMouseGlobal|SDL_WriteStorageFile|SDL_WriteSurfacePixel|SDL_WriteSurfacePixelFloat)$"; @@ ( func( ... ) - == 0 | - func( + !func( ... ) - < 0 | - func( + !func( ... ) - != 0 | - func( + !func( ... ) - == -1 )
This commit is contained in:
@@ -86,8 +86,7 @@ static int (*PIPEWIRE_pw_core_disconnect)(struct pw_core *);
|
||||
static struct pw_node_info * (*PIPEWIRE_pw_node_info_merge)(struct pw_node_info *info, const struct pw_node_info *update, bool reset);
|
||||
static void (*PIPEWIRE_pw_node_info_free)(struct pw_node_info *info);
|
||||
static struct pw_stream *(*PIPEWIRE_pw_stream_new)(struct pw_core *, const char *, struct pw_properties *);
|
||||
static void (*PIPEWIRE_pw_stream_add_listener)(struct pw_stream *stream, struct spa_hook *listener,
|
||||
const struct pw_stream_events *events, void *data);
|
||||
static void (*PIPEWIRE_pw_stream_add_listener)(struct pw_stream *stream, struct spa_hook *listener, const struct pw_stream_events *events, void *data);
|
||||
static void (*PIPEWIRE_pw_stream_destroy)(struct pw_stream *);
|
||||
static int (*PIPEWIRE_pw_stream_connect)(struct pw_stream *, enum pw_direction, uint32_t, enum pw_stream_flags,
|
||||
const struct spa_pod **, uint32_t);
|
||||
@@ -104,26 +103,25 @@ static int (*PIPEWIRE_pw_properties_setf)(struct pw_properties *, const char *,
|
||||
static const char *pipewire_library = SDL_AUDIO_DRIVER_PIPEWIRE_DYNAMIC;
|
||||
static void *pipewire_handle = NULL;
|
||||
|
||||
static int pipewire_dlsym(const char *fn, void **addr)
|
||||
static bool pipewire_dlsym(const char *fn, void **addr)
|
||||
{
|
||||
*addr = SDL_LoadFunction(pipewire_handle, fn);
|
||||
if (!*addr) {
|
||||
// Don't call SDL_SetError(): SDL_LoadFunction already did.
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
return 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
#define SDL_PIPEWIRE_SYM(x) \
|
||||
if (!pipewire_dlsym(#x, (void **)(char *)&PIPEWIRE_##x)) { \
|
||||
return -1; \
|
||||
}
|
||||
#define SDL_PIPEWIRE_SYM(x) \
|
||||
if (!pipewire_dlsym(#x, (void **)(char *)&PIPEWIRE_##x)) \
|
||||
return false
|
||||
|
||||
static int load_pipewire_library(void)
|
||||
static bool load_pipewire_library(void)
|
||||
{
|
||||
pipewire_handle = SDL_LoadObject(pipewire_library);
|
||||
return pipewire_handle ? 0 : -1;
|
||||
return pipewire_handle ? true : false;
|
||||
}
|
||||
|
||||
static void unload_pipewire_library(void)
|
||||
@@ -138,9 +136,9 @@ static void unload_pipewire_library(void)
|
||||
|
||||
#define SDL_PIPEWIRE_SYM(x) PIPEWIRE_##x = x
|
||||
|
||||
static int load_pipewire_library(void)
|
||||
static bool load_pipewire_library(void)
|
||||
{
|
||||
return 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
static void unload_pipewire_library(void)
|
||||
@@ -150,7 +148,7 @@ static void unload_pipewire_library(void)
|
||||
|
||||
#endif // SDL_AUDIO_DRIVER_PIPEWIRE_DYNAMIC
|
||||
|
||||
static int load_pipewire_syms(void)
|
||||
static bool load_pipewire_syms(void)
|
||||
{
|
||||
SDL_PIPEWIRE_SYM(pw_get_library_version);
|
||||
SDL_PIPEWIRE_SYM(pw_check_library_version);
|
||||
@@ -192,18 +190,18 @@ static int load_pipewire_syms(void)
|
||||
SDL_PIPEWIRE_SYM(pw_properties_set);
|
||||
SDL_PIPEWIRE_SYM(pw_properties_setf);
|
||||
|
||||
return 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
static int init_pipewire_library(void)
|
||||
static bool init_pipewire_library(void)
|
||||
{
|
||||
if (!load_pipewire_library()) {
|
||||
if (!load_pipewire_syms()) {
|
||||
if (load_pipewire_library()) {
|
||||
if (load_pipewire_syms()) {
|
||||
PIPEWIRE_pw_init(NULL, NULL);
|
||||
return 0;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
return false;
|
||||
}
|
||||
|
||||
static void deinit_pipewire_library(void)
|
||||
@@ -293,9 +291,9 @@ static uint32_t param_clear(struct spa_list *param_list, uint32_t id)
|
||||
}
|
||||
|
||||
#if PW_CHECK_VERSION(0,3,60)
|
||||
#define SPA_PARAMS_INFO_SEQ(p) ((p).seq)
|
||||
#define SPA_PARAMS_INFO_SEQ(p) ((p).seq)
|
||||
#else
|
||||
#define SPA_PARAMS_INFO_SEQ(p) ((p).padding[0])
|
||||
#define SPA_PARAMS_INFO_SEQ(p) ((p).padding[0])
|
||||
#endif
|
||||
|
||||
static struct param *param_add(struct spa_list *params,
|
||||
@@ -472,7 +470,7 @@ static const struct pw_stream_events stream_events = {
|
||||
.process = on_process,
|
||||
};
|
||||
|
||||
static int PIPEWIRECAMERA_OpenDevice(SDL_Camera *device, const SDL_CameraSpec *spec)
|
||||
static bool PIPEWIRECAMERA_OpenDevice(SDL_Camera *device, const SDL_CameraSpec *spec)
|
||||
{
|
||||
struct pw_properties *props;
|
||||
const struct spa_pod *params[3];
|
||||
@@ -481,11 +479,11 @@ static int PIPEWIRECAMERA_OpenDevice(SDL_Camera *device, const SDL_CameraSpec *s
|
||||
struct spa_pod_builder b = SPA_POD_BUILDER_INIT(buffer, sizeof(buffer));
|
||||
|
||||
if (!device) {
|
||||
return -1;
|
||||
return false;
|
||||
}
|
||||
device->hidden = (struct SDL_PrivateCameraData *) SDL_calloc(1, sizeof (struct SDL_PrivateCameraData));
|
||||
if (device->hidden == NULL) {
|
||||
return -1;
|
||||
return false;
|
||||
}
|
||||
pw_array_init(&device->hidden->buffers, 64);
|
||||
|
||||
@@ -497,13 +495,12 @@ static int PIPEWIRECAMERA_OpenDevice(SDL_Camera *device, const SDL_CameraSpec *s
|
||||
PW_KEY_TARGET_OBJECT, device->name,
|
||||
NULL);
|
||||
if (props == NULL) {
|
||||
return -1;
|
||||
return false;
|
||||
}
|
||||
|
||||
device->hidden->stream = PIPEWIRE_pw_stream_new(hotplug.core,
|
||||
"SDL PipeWire Camera", props);
|
||||
device->hidden->stream = PIPEWIRE_pw_stream_new(hotplug.core, "SDL PipeWire Camera", props);
|
||||
if (device->hidden->stream == NULL) {
|
||||
return -1;
|
||||
return false;
|
||||
}
|
||||
|
||||
PIPEWIRE_pw_stream_add_listener(device->hidden->stream,
|
||||
@@ -525,12 +522,12 @@ static int PIPEWIRECAMERA_OpenDevice(SDL_Camera *device, const SDL_CameraSpec *s
|
||||
PW_STREAM_FLAG_AUTOCONNECT |
|
||||
PW_STREAM_FLAG_MAP_BUFFERS,
|
||||
params, n_params)) < 0) {
|
||||
return -1;
|
||||
return false;
|
||||
}
|
||||
|
||||
PIPEWIRE_pw_thread_loop_unlock(hotplug.loop);
|
||||
|
||||
return 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
static void PIPEWIRECAMERA_CloseDevice(SDL_Camera *device)
|
||||
@@ -550,15 +547,15 @@ static void PIPEWIRECAMERA_CloseDevice(SDL_Camera *device)
|
||||
PIPEWIRE_pw_thread_loop_unlock(hotplug.loop);
|
||||
}
|
||||
|
||||
static int PIPEWIRECAMERA_WaitDevice(SDL_Camera *device)
|
||||
static bool PIPEWIRECAMERA_WaitDevice(SDL_Camera *device)
|
||||
{
|
||||
PIPEWIRE_pw_thread_loop_lock(hotplug.loop);
|
||||
PIPEWIRE_pw_thread_loop_wait(hotplug.loop);
|
||||
PIPEWIRE_pw_thread_loop_unlock(hotplug.loop);
|
||||
return 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
static int PIPEWIRECAMERA_AcquireFrame(SDL_Camera *device, SDL_Surface *frame, Uint64 *timestampNS)
|
||||
static SDL_CameraFrameResult PIPEWIRECAMERA_AcquireFrame(SDL_Camera *device, SDL_Surface *frame, Uint64 *timestampNS)
|
||||
{
|
||||
struct pw_buffer *b;
|
||||
|
||||
@@ -574,7 +571,7 @@ static int PIPEWIRECAMERA_AcquireFrame(SDL_Camera *device, SDL_Surface *frame, U
|
||||
}
|
||||
if (b == NULL) {
|
||||
PIPEWIRE_pw_thread_loop_unlock(hotplug.loop);
|
||||
return 0;
|
||||
return SDL_CAMERA_FRAME_SKIP;
|
||||
}
|
||||
|
||||
#if PW_CHECK_VERSION(1,0,5)
|
||||
@@ -587,7 +584,7 @@ static int PIPEWIRECAMERA_AcquireFrame(SDL_Camera *device, SDL_Surface *frame, U
|
||||
|
||||
PIPEWIRE_pw_thread_loop_unlock(hotplug.loop);
|
||||
|
||||
return 1;
|
||||
return SDL_CAMERA_FRAME_READY;
|
||||
}
|
||||
|
||||
static void PIPEWIRECAMERA_ReleaseFrame(SDL_Camera *device, SDL_Surface *frame)
|
||||
@@ -625,7 +622,7 @@ static void collect_rates(CameraFormatAddData *data, struct param *p, SDL_PixelF
|
||||
SPA_FALLTHROUGH;
|
||||
case SPA_CHOICE_Enum:
|
||||
for (i = 0; i < n_vals; i++) {
|
||||
if (SDL_AddCameraFormat(data, sdlfmt, colorspace, size->width, size->height, rates[i].num, rates[i].denom) < 0) {
|
||||
if (!SDL_AddCameraFormat(data, sdlfmt, colorspace, size->width, size->height, rates[i].num, rates[i].denom)) {
|
||||
return; // Probably out of memory; we'll go with what we have, if anything.
|
||||
}
|
||||
}
|
||||
@@ -976,7 +973,7 @@ static bool pipewire_server_version_at_least(int major, int minor, int patch)
|
||||
}
|
||||
|
||||
// The hotplug thread
|
||||
static int hotplug_loop_init(void)
|
||||
static bool hotplug_loop_init(void)
|
||||
{
|
||||
int res;
|
||||
|
||||
@@ -1028,7 +1025,7 @@ static int hotplug_loop_init(void)
|
||||
PW_REQUIRED_MAJOR, PW_REQUIRED_MINOR, PW_REQUIRED_PATCH);
|
||||
}
|
||||
|
||||
return 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -1037,24 +1034,24 @@ static void PIPEWIRECAMERA_Deinitialize(void)
|
||||
if (pipewire_initialized) {
|
||||
if (hotplug.loop) {
|
||||
PIPEWIRE_pw_thread_loop_lock(hotplug.loop);
|
||||
}
|
||||
}
|
||||
if (hotplug.registry) {
|
||||
spa_hook_remove(&hotplug.registry_listener);
|
||||
PIPEWIRE_pw_proxy_destroy((struct pw_proxy*)hotplug.registry);
|
||||
}
|
||||
spa_hook_remove(&hotplug.registry_listener);
|
||||
PIPEWIRE_pw_proxy_destroy((struct pw_proxy *)hotplug.registry);
|
||||
}
|
||||
if (hotplug.core) {
|
||||
spa_hook_remove(&hotplug.core_listener);
|
||||
PIPEWIRE_pw_core_disconnect(hotplug.core);
|
||||
}
|
||||
spa_hook_remove(&hotplug.core_listener);
|
||||
PIPEWIRE_pw_core_disconnect(hotplug.core);
|
||||
}
|
||||
if (hotplug.context) {
|
||||
PIPEWIRE_pw_context_destroy(hotplug.context);
|
||||
}
|
||||
}
|
||||
if (hotplug.loop) {
|
||||
PIPEWIRE_pw_thread_loop_unlock(hotplug.loop);
|
||||
PIPEWIRE_pw_thread_loop_destroy(hotplug.loop);
|
||||
}
|
||||
}
|
||||
deinit_pipewire_library();
|
||||
spa_zero(hotplug);
|
||||
spa_zero(hotplug);
|
||||
pipewire_initialized = false;
|
||||
}
|
||||
}
|
||||
@@ -1063,13 +1060,13 @@ static bool PIPEWIRECAMERA_Init(SDL_CameraDriverImpl *impl)
|
||||
{
|
||||
if (!pipewire_initialized) {
|
||||
|
||||
if (init_pipewire_library() < 0) {
|
||||
if (!init_pipewire_library()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
pipewire_initialized = true;
|
||||
|
||||
if (hotplug_loop_init() < 0) {
|
||||
if (!hotplug_loop_init()) {
|
||||
PIPEWIRECAMERA_Deinitialize();
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user