mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-07-19 17:49:14 +00:00
Revert "UI: Always create a display capture on first run"
This reverts commit 35b2ce565a
.
There is far too much potential for issues to occur if the first-time
start creates a display capture by default on linux and windows.
Display capture on windows laptops will not be guaranteed to capture
properly, leaving the user with a blank screen. Display capture on
linux downloads its image off the graphics processor, so it's quite
inefficient to have on by default.
This commit is contained in:
parent
9630c3032c
commit
ecb8c2c045
|
@ -350,31 +350,10 @@ static inline bool HasAudioDevices(const char *source_id)
|
|||
return count != 0;
|
||||
}
|
||||
|
||||
void OBSBasic::CreateFirstRunSources(obs_scene_t *scene)
|
||||
void OBSBasic::CreateFirstRunSources()
|
||||
{
|
||||
bool hasDesktopAudio = HasAudioDevices(App()->OutputAudioSource());
|
||||
bool hasInputAudio = HasAudioDevices(App()->InputAudioSource());
|
||||
const char *displayCaptureType = nullptr;
|
||||
obs_source_t *source = nullptr;
|
||||
|
||||
#ifdef __APPLE__
|
||||
displayCaptureType = "display_capture";
|
||||
#elif _WIN32
|
||||
if (GetWindowsVersion() >= 0x602)
|
||||
displayCaptureType = "monitor_capture";
|
||||
#else //X11
|
||||
displayCaptureType = "xshm_input";
|
||||
#endif
|
||||
if (displayCaptureType) {
|
||||
source = obs_source_create(OBS_SOURCE_TYPE_INPUT,
|
||||
displayCaptureType, Str("Basic.DisplayCapture"),
|
||||
NULL, nullptr);
|
||||
}
|
||||
if (source) {
|
||||
obs_scene_add(scene, source);
|
||||
obs_add_source(source);
|
||||
obs_source_release(source);
|
||||
}
|
||||
|
||||
if (hasDesktopAudio)
|
||||
ResetAudioDevice(App()->OutputAudioSource(), "default",
|
||||
|
@ -396,7 +375,7 @@ void OBSBasic::CreateDefaultScene(bool firstStart)
|
|||
obs_add_source(source);
|
||||
|
||||
if (firstStart)
|
||||
CreateFirstRunSources(scene);
|
||||
CreateFirstRunSources();
|
||||
|
||||
obs_set_output_source(0, obs_scene_get_source(scene));
|
||||
obs_scene_release(scene);
|
||||
|
|
|
@ -117,7 +117,7 @@ private:
|
|||
|
||||
void SetupEncoders();
|
||||
|
||||
void CreateFirstRunSources(obs_scene_t *scene);
|
||||
void CreateFirstRunSources();
|
||||
void CreateDefaultScene(bool firstStart);
|
||||
|
||||
void ClearVolumeControls();
|
||||
|
|
Loading…
Reference in a new issue