From 870fc37cf6c0ca5381b5da8a5b4d6c4b97de353b Mon Sep 17 00:00:00 2001 From: seife Date: Sun, 20 Feb 2011 17:00:55 +0000 Subject: [PATCH] neutrino: export screen dimensions, so that plugins don't need to jump through ugly hoops git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1176 e54a6e83-5905-42d5-8d5c-058d10e6a962 --- src/gui/plugins.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/gui/plugins.cpp b/src/gui/plugins.cpp index d984c2c17..c1622e204 100644 --- a/src/gui/plugins.cpp +++ b/src/gui/plugins.cpp @@ -328,6 +328,16 @@ void CPlugins::startPlugin(int number,int /*param*/) { // always delete old output delScriptOutput(); + /* export neutrino settings to the environment */ + char tmp[32]; + sprintf(tmp, "%d", g_settings.screen_StartX); + setenv("SCREEN_OFF_X", tmp, 1); + sprintf(tmp, "%d", g_settings.screen_StartY); + setenv("SCREEN_OFF_Y", tmp, 1); + sprintf(tmp, "%d", g_settings.screen_EndX); + setenv("SCREEN_END_X", tmp, 1); + sprintf(tmp, "%d", g_settings.screen_EndY); + setenv("SCREEN_END_Y", tmp, 1); //bool ispip = strncmp(plugin_list[number].pluginfile.c_str(), "pip", 3) ? false : true; bool ispip = strstr(plugin_list[number].pluginfile.c_str(), "pip") != 0;