caffeinetv / obs-studio

OBS Studio - Free and open source software for live streaming and screen recording
https://obsproject.com/
GNU General Public License v2.0
6 stars 1 forks source link

libobs/UI: Reorder autoconfig ui #25

Closed Andersama closed 5 years ago

Andersama commented 5 years ago

This change is Reviewable

cogwheel commented 5 years ago

UI/window-basic-auto-config.cpp, line 511 at r1 (raw file):

Previously, cogwheel (Matthew Orlando) wrote…
This prevents caffeine auth from working when the browser is disabled. Removing the check entirely won't work because then it will show the connect button for twitch even when the browser is not available. I think the best approach would be to add a new entry to `Auth::Type` called, for example, `CustomAuth`. Then `is_auth_service` would check `cef` and change `Auth::Type::OAuth_StreamKey` into `Auth::Type::None` if `cef` is null
bool is_auth_service(Auth::Type type) {
    if (!cef && type == Auth::Type::OAuth_StreamKey) {
        return false;
    }
    return type != Auth::Type::None;
}
cogwheel commented 5 years ago

UI/window-basic-auto-config.cpp, line 480 at r1 (raw file):

static inline bool is_auth_service(const std::string &service)
{
  return Auth::AuthType(service) != Auth::Type::None;
Auth::Type type = Auth::AuthType(service);
if (!cef && type == Auth::Type::OAuth_StreamKey) {
    return Auth::Type::None;
}
return type != Auth::Type::None;