Opened 18 years ago
Closed 18 years ago
#1586 closed patch (fixed)
LCD::Get() creates LCD object, even when disabled
Reported by: | Owned by: | Isaac Richards | |
---|---|---|---|
Priority: | minor | Milestone: | unknown |
Component: | mythtv | Version: | |
Severity: | medium | Keywords: | |
Cc: | Ticket locked: | no |
Description
While debugging something entirely unrelated I noticed that calls to LCD::Get() were returning non-NULL even though I have the LCD stuff disabled in my settings. As a result anybody using LCD::Get() to determing whether they should do LCD-update stuff was doing the work anyways despite the fact that the results would go unused in the LCD object itself (in my case it was TV::RunTV() making the extra effort).
This patch tracks the global setting better and prevents LCD::Get() from newing LCDs if the LCD is disabled in the settings, regardless of m_server_unavailable.
This works for my purposes, but I don't have a LCD to regression test with so somebody with the hardware should probably test this before it gets committed.
--Jack
Attachments (1)
Change History (5)
Changed 18 years ago by
Attachment: | trunk_9499_lcd.patch added |
---|
comment:1 Changed 18 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
Patch looks to just disable the LCD class completely, as the new 'enabled' variable wouldn't ever get set to true.
comment:2 Changed 18 years ago by
I admittedly don't know much about the LCD code, but it was my impression that to use the LCD class you had to first call LCD::Setup() (at least this is what mythfrontend does in main() ). In the patch m_enabled is set in LCD::Setup():
m_enabled = gContext->GetNumSetting("LCDEnable", 0) != 0;
I also set m_enabled in LCD::connectToHost():
m_enabled = gContext->GetNumSetting("LCDEnable", 0) != 0;
If calling LCD::Setup() isn't a requirement I'd think that calling LCD::connectToHost() would be and then m_enabled would be set there.
Or maybe I'm missing something entirely more obvious? Sorry if that's the case...
comment:3 Changed 18 years ago by
Resolution: | invalid |
---|---|
Status: | closed → reopened |
Yup, you're right, my apologies.
patch against trunk r9499