On 21.02.2017 23:14, Gerd Hoffmann wrote: > Add defines for the sparc and ppc arch specific graphics defaults. > They return the graphic_* values these variables are non-zero, and > the default values otherwise. > > After switching over ppc and sparc to use these we don't need the > arch-specific initialization for the graphic_* variables any more. > > Signed-off-by: Gerd Hoffmann <kra...@redhat.com> > --- > include/sysemu/sysemu.h | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/include/sysemu/sysemu.h b/include/sysemu/sysemu.h > index 576c7ce..9450788 100644 > --- a/include/sysemu/sysemu.h > +++ b/include/sysemu/sysemu.h > @@ -142,9 +142,16 @@ typedef enum { > extern int vga_interface_type; > #define xenfb_enabled (vga_interface_type == VGA_XENFB) > > +#define sparc_graphic_width (graphic_width ? graphic_width : 1024) > +#define sparc_graphic_height (graphic_height ? graphic_height : 768) > +#define sparc_graphic_depth (graphic_depth ? graphic_depth : 8) > +#define ppc_graphic_width (graphic_width ? graphic_width : 800) > +#define ppc_graphic_height (graphic_height ? graphic_height : 600) > +#define ppc_graphic_depth (graphic_depth ? graphic_depth : 32)
I have to say that I really dislike the idea to hide this logic in such macros. Could we please do it without such macros, i.e. by just adding some code a la if (!graphic_width) { graphic_width = 800; } to the right machine_init() functions instead? Thomas