X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=nageru%2Ftheme.cpp;h=c6cf4515805ad83be506f783d26df92b30ebc103;hb=a60a2c892c08f6fab3a1e6b7cf4343cad8689058;hp=ce3d2d6d55c917f6fdc0afba77c1cec348428ca2;hpb=6b5340251a6b759f9f5dc790a677e3b764806349;p=nageru diff --git a/nageru/theme.cpp b/nageru/theme.cpp index ce3d2d6..c6cf451 100644 --- a/nageru/theme.cpp +++ b/nageru/theme.cpp @@ -1295,6 +1295,10 @@ int Nageru_set_supports_wb(lua_State *L) Theme::Theme(const string &filename, const vector &search_dirs, ResourcePool *resource_pool, unsigned num_cards) : resource_pool(resource_pool), num_cards(num_cards), signal_to_card_mapping(global_flags.default_stream_mapping) { + // Defaults. + channel_names[0] = "Live"; + channel_names[1] = "Preview"; + L = luaL_newstate(); luaL_openlibs(L); @@ -1569,6 +1573,12 @@ string Theme::get_channel_name(unsigned channel) { lock_guard lock(m); + // We never ask the legacy channel_name() about live and preview. + // The defaults are set in our constructor. + if (channel == 0 || channel == 1) { + return channel_names[channel]; + } + lua_getglobal(L, "channel_name"); if (lua_isnil(L, -1)) { lua_pop(L, 1);