</control>
<control type="group" id="130">
<control type="grouplist">
- <left>20</left>
- <top>660</top>
- <width>305</width>
- <height>40</height>
- <align>right</align>
+ <left>50</left>
+ <top>659</top>
+ <width>605</width>
+ <height>30</height>
<orientation>horizontal</orientation>
<itemgap>5</itemgap>
<control type="image">
- <width>40</width>
- <height>40</height>
+ <width>30</width>
+ <height>30</height>
<texture>DefaultIconInfo.png</texture>
</control>
<control type="label">
<description>notification</description>
- <width min="10" max="260">auto</width>
- <height>40</height>
+ <width min="10" max="560">auto</width>
+ <height>30</height>
<font>font13</font>
<textcolor>white</textcolor>
- <label>31413</label>
+ <label>$LOCALIZE[31413]</label>
<aligny>center</aligny>
- <wrapmultiline>true</wrapmultiline>
</control>
</control>
</control>
msgid "Enable"
msgstr ""
+#. Defines the state of the add-on in the add-on manager window
#: xbmc/filesystem/AddonsDirectory.cpp
msgctxt "#24023"
-msgid "Add-on disabled"
+msgid "Disabled"
msgstr ""
#empty strings from id 24024 to 24026
<requirement>HAS_ZEROCONF</requirement>
<group id="1">
<setting id="services.zeroconf" type="boolean" label="1260" help="36342">
- <level>2</level>
+ <level>1</level>
<default>true</default>
<control type="toggle" />
</setting>
exec_prefix="@exec_prefix@"
datarootdir="@datarootdir@"
LIBDIR="@libdir@"
+CRASHLOG_DIR=${CRASHLOG_DIR:-$HOME}
# Check for some options used by this script
while [ "$#" -gt "0" ]
print_crash_report()
{
- FILE="$HOME/xbmc_crashlog-`date +%Y%m%d_%H%M%S`.log"
+ FILE="$CRASHLOG_DIR/xbmc_crashlog-`date +%Y%m%d_%H%M%S`.log"
echo "############## XBMC CRASH LOG ###############" >> $FILE
echo >> $FILE
echo "################ SYSTEM INFO ################" >> $FILE
else if (StringUtils::StartsWithNoCase(strLine,"TITLE"))
{
if (m_iTotalTracks == -1) // No tracks yet
- ExtractQuoteInfo(strLine, m_strAlbum);
- else if (!ExtractQuoteInfo(strLine, m_Track[m_iTotalTracks].strTitle))
- {
- // lets manage tracks titles without quotes
- CStdString titleNoQuote = strLine.substr(5);
- StringUtils::TrimLeft(titleNoQuote);
- if (!titleNoQuote.empty())
- {
- g_charsetConverter.unknownToUTF8(titleNoQuote);
- m_Track[m_iTotalTracks].strTitle = titleNoQuote;
- }
- }
+ m_strAlbum = ExtractInfo(strLine.substr(5));
+ else
+ m_Track[m_iTotalTracks].strTitle = ExtractInfo(strLine.substr(5));
}
else if (StringUtils::StartsWithNoCase(strLine,"PERFORMER"))
{
if (m_iTotalTracks == -1) // No tracks yet
- ExtractQuoteInfo(strLine, m_strArtist);
+ m_strArtist = ExtractInfo(strLine.substr(9));
else // New Artist for this track
- ExtractQuoteInfo(strLine, m_Track[m_iTotalTracks].strArtist);
+ m_Track[m_iTotalTracks].strArtist = ExtractInfo(strLine.substr(9));
}
else if (StringUtils::StartsWithNoCase(strLine,"TRACK"))
{
if(strCurrentFile.size() > 0)
bCurrentFileChanged = true;
- ExtractQuoteInfo(strLine, strCurrentFile);
+ strCurrentFile = ExtractInfo(strLine.substr(4));
// Resolve absolute paths (if needed).
if (strCurrentFile.length() > 0)
}
else if (StringUtils::StartsWithNoCase(strLine,"REM GENRE"))
{
- if (!ExtractQuoteInfo(strLine, m_strGenre))
- {
- CStdString genreNoQuote = strLine.substr(9);
- StringUtils::TrimLeft(genreNoQuote);
- if (!genreNoQuote.empty())
- {
- g_charsetConverter.unknownToUTF8(genreNoQuote);
- m_strGenre = genreNoQuote;
- }
- }
+ m_strGenre = ExtractInfo(strLine.substr(9));
}
else if (StringUtils::StartsWithNoCase(strLine,"REM REPLAYGAIN_ALBUM_GAIN"))
m_replayGainAlbumGain = (float)atof(strLine.substr(26).c_str());
}
////////////////////////////////////////////////////////////////////////////////////
-// Function: ExtractQuoteInfo()
+// Function: ExtractInfo()
// Extracts the information in quotes from the string line, returning it in quote
////////////////////////////////////////////////////////////////////////////////////
-bool CCueDocument::ExtractQuoteInfo(const CStdString &line, CStdString "e)
+CStdString CCueDocument::ExtractInfo(const CStdString &line)
{
- quote.clear();
size_t left = line.find('\"');
- if (left == std::string::npos) return false;
- size_t right = line.find('\"', left + 1);
- if (right == std::string::npos) return false;
- quote = line.substr(left + 1, right - left - 1);
- g_charsetConverter.unknownToUTF8(quote);
- return true;
+ if (left != std::string::npos)
+ {
+ size_t right = line.find('\"', left + 1);
+ if (right != std::string::npos)
+ {
+ CStdString text = line.substr(left + 1, right - left - 1);
+ g_charsetConverter.unknownToUTF8(text);
+ return text;
+ }
+ }
+ CStdString text = line;
+ StringUtils::Trim(text);
+ g_charsetConverter.unknownToUTF8(text);
+ return text;
}
////////////////////////////////////////////////////////////////////////////////////
std::vector<CCueTrack> m_Track;
bool ReadNextLine(CStdString &strLine);
- bool ExtractQuoteInfo(const CStdString &line, CStdString "e);
+ CStdString ExtractInfo(const CStdString &line);
int ExtractTimeFromIndex(const CStdString &index);
int ExtractNumericInfo(const CStdString &info);
bool ResolvePath(CStdString &strPath, const CStdString &strBase);
toast->ResetTimer();
toast->Close(true);
}
- CSettings::Get().SetString("lookandfeel.skin",m_addon->ID().c_str());
+ if (CSettings::Get().GetString("lookandfeel.skin") == m_addon->ID())
+ CApplicationMessenger::Get().ExecBuiltIn("ReloadSkin", true);
+ else
+ CSettings::Get().SetString("lookandfeel.skin",m_addon->ID().c_str());
}
}
{
CLog::Log(LOGNOTICE, "D3D: rendering method forced to DXVA processor");
m_renderMethod = RENDER_DXVA;
- if (!m_processor->Open(m_sourceWidth, m_sourceHeight, m_iFlags, m_format, m_extended_format))
+ if (!m_processor || !m_processor->Open(m_sourceWidth, m_sourceHeight, m_iFlags, m_format, m_extended_format))
{
CLog::Log(LOGNOTICE, "D3D: unable to open DXVA processor");
- m_processor->Close();
+ if (m_processor)
+ m_processor->Close();
m_renderMethod = RENDER_INVALID;
}
}
{
case RENDER_METHOD_DXVAHD:
case RENDER_METHOD_DXVA:
- m_renderMethod = RENDER_DXVA;
- if (m_processor->Open(m_sourceWidth, m_sourceHeight, m_iFlags, m_format, m_extended_format))
- break;
- else
+ if (!m_processor || !m_processor->Open(m_sourceWidth, m_sourceHeight, m_iFlags, m_format, m_extended_format))
{
CLog::Log(LOGNOTICE, "D3D: unable to open DXVA processor");
- m_processor->Close();
+ if (m_processor)
+ m_processor->Close();
+ }
+ else
+ {
+ m_renderMethod = RENDER_DXVA;
+ break;
}
// Drop through to pixel shader
case RENDER_METHOD_AUTO:
m_iRequestedMethod = CSettings::Get().GetInt("videoplayer.rendermethod");
- if (g_advancedSettings.m_DXVAForceProcessorRenderer || m_iRequestedMethod == RENDER_METHOD_DXVA
- || m_iRequestedMethod == RENDER_METHOD_DXVAHD)
+ if (g_advancedSettings.m_DXVAForceProcessorRenderer
+ || m_iRequestedMethod == RENDER_METHOD_DXVA
+ || m_iRequestedMethod == RENDER_METHOD_DXVAHD)
{
if (m_iRequestedMethod != RENDER_METHOD_DXVA && CSysInfo::IsWindowsVersionAtLeast(CSysInfo::WindowsVersionWin7))
{
{
CLog::Log(LOGNOTICE, "CWinRenderer::Preinit - could not init DXVA-HD processor - skipping");
SAFE_DELETE(m_processor);
- m_processor = new DXVA::CProcessor();
}
- else
- return 0;
}
- else
+ if (!m_processor)
+ {
m_processor = new DXVA::CProcessor();
-
- if (!m_processor->PreInit())
- CLog::Log(LOGNOTICE, "CWinRenderer::Preinit - could not init DXVA2 processor - skipping");
- else
- return 0;
+ if (!m_processor->PreInit())
+ {
+ CLog::Log(LOGNOTICE, "CWinRenderer::Preinit - could not init DXVA2 processor - skipping");
+ SAFE_DELETE(m_processor);
+ }
+ }
}
-
- if (g_Windowing.IsTextureFormatOk(D3DFMT_L16, 0))
+ // allow other color spaces besides YV12 in case DXVA rendering is not used or not available
+ if (!m_processor || (m_iRequestedMethod != RENDER_METHOD_DXVA && m_iRequestedMethod != RENDER_METHOD_DXVAHD))
{
- m_formats.push_back(RENDER_FMT_YUV420P10);
- m_formats.push_back(RENDER_FMT_YUV420P16);
+ if (g_Windowing.IsTextureFormatOk(D3DFMT_L16, 0))
+ {
+ m_formats.push_back(RENDER_FMT_YUV420P10);
+ m_formats.push_back(RENDER_FMT_YUV420P16);
+ }
+ m_formats.push_back(RENDER_FMT_NV12);
+ m_formats.push_back(RENDER_FMT_YUYV422);
+ m_formats.push_back(RENDER_FMT_UYVY422);
}
- m_formats.push_back(RENDER_FMT_NV12);
- m_formats.push_back(RENDER_FMT_YUYV422);
- m_formats.push_back(RENDER_FMT_UYVY422);
-
return 0;
}
{
float fPercent;
if (m_orientation == VERTICAL)
- fPercent = (point.y - m_guiBackground.GetYPosition() - 0.5f*m_guiBarFocus.GetHeight()) / m_guiBackground.GetHeight();
+ fPercent = (point.y - m_guiBackground.GetYPosition() - 0.5f*m_guiBarFocus.GetHeight()) / (m_guiBackground.GetHeight() - m_guiBarFocus.GetHeight());
else
- fPercent = (point.x - m_guiBackground.GetXPosition() - 0.5f*m_guiBarFocus.GetWidth()) / m_guiBackground.GetWidth();
+ fPercent = (point.x - m_guiBackground.GetXPosition() - 0.5f*m_guiBarFocus.GetWidth()) / (m_guiBackground.GetWidth() - m_guiBarFocus.GetWidth());
if (fPercent < 0) fPercent = 0;
if (fPercent > 1) fPercent = 1;
- int offset = (int)(floor(fPercent * m_numItems + 0.5f));
+ int offset = (int)(floor(fPercent * (m_numItems - m_pageSize) + 0.5f));
if (m_offset != offset)
{
// Details: Total Axis: 37 Total Hats: 0 Total Buttons: 57
// NOTICE: Enabled Joystick: Microsoft Microsoft® 2.4GHz Transceiver v6.0
// Details: Total Axis: 37 Total Hats: 0 Total Buttons: 57
+ // also checks if we have at least 1 button, fixes
+ // NOTICE: Enabled Joystick: ST LIS3LV02DL Accelerometer
+ // Details: Total Axis: 3 Total Hats: 0 Total Buttons: 0
int num_axis = SDL_JoystickNumAxes(joy);
int num_buttons = SDL_JoystickNumButtons(joy);
- if (num_axis > 20 && num_buttons > 50)
- CLog::Log(LOGNOTICE, "Your Joystick seems to be a Keyboard, ignoring it: %s Axis: %d Buttons: %d",
- SDL_JoystickName(i), num_axis, num_buttons);
+ if ((num_axis > 20 && num_buttons > 50) || num_buttons == 0)
+ {
+ CLog::Log(LOGNOTICE, "Ignoring Joystick %s Axis: %d Buttons: %d: invalid device properties",
+ SDL_JoystickName(i), num_axis, num_buttons);
+ }
else
{
m_JoystickNames.push_back(string(SDL_JoystickName(i)));
#ifdef TARGET_WINDOWS
#include "utils/SystemInfo.h"
#include "win32/WIN32Util.h"
+#include "utils/CharsetConverter.h"
#endif
/* slightly modified in_ether taken from the etherboot project (http://sourceforge.net/projects/etherboot) */
char hostName[128];
if (gethostname(hostName, sizeof(hostName)))
return CStdString("unknown");
- else
- return CStdString(hostName);
+
+ std::string hostStr;
+#ifdef TARGET_WINDOWS
+ g_charsetConverter.systemToUtf8(hostName, hostStr);
+#else
+ hostStr = hostName;
+#endif
+ return hostStr;
}
CNetworkInterface* CNetwork::GetFirstConnectedInterface()
return true;
}
+void CSettingsManager::OnSettingsUnloaded()
+{
+ CSharedLock lock(m_critical);
+ for (SettingsHandlers::const_iterator it = m_settingsHandlers.begin(); it != m_settingsHandlers.end(); ++it)
+ (*it)->OnSettingsUnloaded();
+}
+
void CSettingsManager::OnSettingsLoaded()
{
CSharedLock lock(m_critical);
// implementation of ISettingsHandler
virtual bool OnSettingsLoading();
virtual void OnSettingsLoaded();
+ virtual void OnSettingsUnloaded();
virtual bool OnSettingsSaving() const;
virtual void OnSettingsSaved() const;
virtual void OnSettingsCleared();
#include "settings/DisplaySettings.h"
#include "settings/Settings.h"
#include "utils/log.h"
+#include "utils/CharsetConverter.h"
#ifdef TARGET_WINDOWS
#include <tpcshrd.h>
{
const MONITOR_DETAILS &details = GetMonitor(screen);
- DEVMODE sDevMode;
+ DEVMODEW sDevMode;
ZeroMemory(&sDevMode, sizeof(DEVMODE));
sDevMode.dmSize = sizeof(DEVMODE);
- if(!EnumDisplaySettings(details.DeviceName, ENUM_CURRENT_SETTINGS, &sDevMode))
+ if(!EnumDisplaySettingsW(details.DeviceNameW.c_str(), ENUM_CURRENT_SETTINGS, &sDevMode))
CLog::Log(LOGERROR, "%s : EnumDisplaySettings failed with %d", __FUNCTION__, GetLastError());
RECT rc;
{
const MONITOR_DETAILS &details = GetMonitor(res.iScreen);
- DEVMODE sDevMode;
+ DEVMODEW sDevMode;
ZeroMemory(&sDevMode, sizeof(DEVMODE));
sDevMode.dmSize = sizeof(DEVMODE);
// If we can't read the current resolution or any detail of the resolution is different than res
- if (!EnumDisplaySettings(details.DeviceName, ENUM_CURRENT_SETTINGS, &sDevMode) ||
+ if (!EnumDisplaySettingsW(details.DeviceNameW.c_str(), ENUM_CURRENT_SETTINGS, &sDevMode) ||
sDevMode.dmPelsWidth != res.iWidth || sDevMode.dmPelsHeight != res.iHeight ||
sDevMode.dmDisplayFrequency != (int)res.fRefreshRate ||
((sDevMode.dmDisplayFlags & DM_INTERLACED) && !(res.dwFlags & D3DPRESENTFLAG_INTERLACED)) ||
// CDS_FULLSCREEN is for temporary fullscreen mode and prevents icons and windows from moving
// to fit within the new dimensions of the desktop
- LONG rc = ChangeDisplaySettingsEx(details.DeviceName, &sDevMode, NULL, CDS_FULLSCREEN, NULL);
+ LONG rc = ChangeDisplaySettingsExW(details.DeviceNameW.c_str(), &sDevMode, NULL, CDS_FULLSCREEN, NULL);
if (rc != DISP_CHANGE_SUCCESSFUL)
{
CLog::Log(LOGERROR, "%s : ChangeDisplaySettingsEx failed with %d", __FUNCTION__, rc);
{
for(int mode = 0;; mode++)
{
- DEVMODE devmode;
+ DEVMODEW devmode;
ZeroMemory(&devmode, sizeof(devmode));
devmode.dmSize = sizeof(devmode);
- if(EnumDisplaySettings(m_MonitorsInfo[monitor].DeviceName, mode, &devmode) == 0)
+ if(EnumDisplaySettingsW(m_MonitorsInfo[monitor].DeviceNameW.c_str(), mode, &devmode) == 0)
break;
if(devmode.dmBitsPerPel != 32)
continue;
bool CWinSystemWin32::UpdateResolutionsInternal()
{
- DISPLAY_DEVICE ddAdapter;
+ DISPLAY_DEVICEW ddAdapter;
ZeroMemory(&ddAdapter, sizeof(ddAdapter));
ddAdapter.cb = sizeof(ddAdapter);
DWORD adapter = 0;
- while (EnumDisplayDevices(NULL, adapter, &ddAdapter, 0))
+ while (EnumDisplayDevicesW(NULL, adapter, &ddAdapter, 0))
{
// Exclude displays that are not part of the windows desktop. Using them is too different: no windows,
// direct access with GDI CreateDC() or DirectDraw for example. So it may be possible to play video, but GUI?
if (!(ddAdapter.StateFlags & DISPLAY_DEVICE_MIRRORING_DRIVER) && (ddAdapter.StateFlags & DISPLAY_DEVICE_ATTACHED_TO_DESKTOP))
{
- DISPLAY_DEVICE ddMon;
+ DISPLAY_DEVICEW ddMon;
ZeroMemory(&ddMon, sizeof(ddMon));
ddMon.cb = sizeof(ddMon);
bool foundScreen = false;
DWORD screen = 0;
// Just look for the first active output, we're actually only interested in the information at the adapter level.
- while (EnumDisplayDevices(ddAdapter.DeviceName, screen, &ddMon, 0))
+ while (EnumDisplayDevicesW(ddAdapter.DeviceName, screen, &ddMon, 0))
{
if (ddMon.StateFlags & (DISPLAY_DEVICE_ACTIVE | DISPLAY_DEVICE_ATTACHED))
{
// Remoting returns no screens. Handle with a dummy screen.
if (!foundScreen && screen == 0)
{
- lstrcpy(ddMon.DeviceString, _T("Dummy Monitor")); // safe: large static array
+ lstrcpyW(ddMon.DeviceString, L"Dummy Monitor"); // safe: large static array
foundScreen = true;
}
if (foundScreen)
{
- CLog::Log(LOGNOTICE, "Found screen: %s on %s, adapter %d.", ddMon.DeviceString, ddAdapter.DeviceString, adapter);
+ std::string monitorStr, adapterStr;
+ g_charsetConverter.wToUTF8(ddMon.DeviceString, monitorStr);
+ g_charsetConverter.wToUTF8(ddAdapter.DeviceString, adapterStr);
+ CLog::Log(LOGNOTICE, "Found screen: %s on %s, adapter %d.", monitorStr.c_str(), adapterStr.c_str(), adapter);
// get information about the display's current position and display mode
// TODO: for Windows 7/Server 2008 and up, Microsoft recommends QueryDisplayConfig() instead, the API used by the control panel.
- DEVMODE dm;
+ DEVMODEW dm;
ZeroMemory(&dm, sizeof(dm));
dm.dmSize = sizeof(dm);
- if (EnumDisplaySettingsEx(ddAdapter.DeviceName, ENUM_CURRENT_SETTINGS, &dm, 0) == FALSE)
- EnumDisplaySettingsEx(ddAdapter.DeviceName, ENUM_REGISTRY_SETTINGS, &dm, 0);
+ if (EnumDisplaySettingsExW(ddAdapter.DeviceName, ENUM_CURRENT_SETTINGS, &dm, 0) == FALSE)
+ EnumDisplaySettingsExW(ddAdapter.DeviceName, ENUM_REGISTRY_SETTINGS, &dm, 0);
// get the monitor handle and workspace
HMONITOR hm = 0;
POINT pt = { dm.dmPosition.x, dm.dmPosition.y };
hm = MonitorFromPoint(pt, MONITOR_DEFAULTTONULL);
- MONITOR_DETAILS md;
- memset(&md, 0, sizeof(MONITOR_DETAILS));
+ MONITOR_DETAILS md = {};
- strcpy(md.MonitorName, ddMon.DeviceString);
- strcpy(md.CardName, ddAdapter.DeviceString);
- strcpy(md.DeviceName, ddAdapter.DeviceName);
+ md.MonitorNameW = ddMon.DeviceString;
+ md.CardNameW = ddAdapter.DeviceString;
+ md.DeviceNameW = ddAdapter.DeviceName;
// width x height @ x,y - bpp - refresh rate
// note that refresh rate information is not available on Win9x
#define WINDOW_SYSTEM_WIN32_H
#include "windowing/WinSystem.h"
+#include <string>
struct MONITOR_DETAILS
{
bool Interlaced;
HMONITOR hMonitor;
- char MonitorName[128];
- char CardName[128];
- char DeviceName[128];
+ std::wstring MonitorNameW;
+ std::wstring CardNameW;
+ std::wstring DeviceNameW;
int ScreenNumber; // XBMC POV, not Windows. Windows primary is XBMC #0, then each secondary is +1.
};