Fix static initialization order problem with Horus GUI (#4141)
* [480x272] Fix static initialization order problem with Layout, Theme, & Widget factories. * [480x272] Fix return from drawTimerMode(). * [480x272] Remove use of macros for registered Layout, Widget, & Theme class lists; remove extern declarations (cosmetic). * [480x272] Convert Layout and Theme registry to dynamic lists (still max. of 10 each); Hide indicator arrow when user is at start/end of available widgets in spinner UI; Add some sanity checking to pointer usage in screens_setup; Add an (arbitrary) limit of 20 Widgets; And a line break! :)
This commit is contained in:
committed by
Bertrand Songis
parent
d4d3d51a9d
commit
bce42bb25c
@@ -21,6 +21,7 @@
|
||||
#ifndef _LAYOUT_H_
|
||||
#define _LAYOUT_H_
|
||||
|
||||
#include <list>
|
||||
#include "widgets_container.h"
|
||||
|
||||
#define MAX_LAYOUT_ZONES 10
|
||||
@@ -113,11 +114,10 @@ class BaseLayoutFactory: public LayoutFactory
|
||||
const ZoneOption * options;
|
||||
};
|
||||
|
||||
#define MAX_REGISTERED_LAYOUTS 10
|
||||
|
||||
extern unsigned int countRegisteredLayouts;
|
||||
extern const LayoutFactory * registeredLayouts[MAX_REGISTERED_LAYOUTS];
|
||||
Layout * loadLayout(const char * name, Layout::PersistentData * persistentData);
|
||||
void loadCustomScreens();
|
||||
|
||||
#define MAX_REGISTERED_LAYOUTS 10
|
||||
std::list<const LayoutFactory *> & getRegisteredLayouts();
|
||||
|
||||
#endif // _LAYOUT_H_
|
||||
|
||||
Reference in New Issue
Block a user