Skip to content

Commit fe3e1b5

Browse files
authored
camera: don't reinit when core sets av info; don't poll if not allowed (#17588)
1 parent 9438d70 commit fe3e1b5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

runloop.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2669,6 +2669,8 @@ bool runloop_environment_cb(unsigned cmd, void *data)
26692669
reinit_flags =
26702670
DRIVERS_CMD_ALL &
26712671
~(DRIVER_VIDEO_MASK | DRIVER_INPUT_MASK | DRIVER_MENU_MASK);
2672+
/* no need to reinit camera or microphone here */
2673+
reinit_flags &= ~(DRIVER_CAMERA_MASK | DRIVER_MICROPHONE_MASK);
26722674

26732675
RARCH_LOG("[Environ]: SET_SYSTEM_AV_INFO: %ux%u, Aspect: %.3f, FPS: %.2f, Sample rate: %.2f Hz.\n",
26742676
(*info)->geometry.base_width, (*info)->geometry.base_height,
@@ -7030,7 +7032,8 @@ int runloop_iterate(void)
70307032
bsv_movie_next_frame(input_st);
70317033
#endif
70327034

7033-
if ( camera_st->cb.caps
7035+
if ( settings->bools.camera_allow
7036+
&& camera_st->cb.caps
70347037
&& camera_st->driver
70357038
&& camera_st->driver->poll
70367039
&& camera_st->data)

0 commit comments

Comments
 (0)