aboutsummaryrefslogtreecommitdiffstats
path: root/src/screen.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-10-03 14:31:00 +0200
committerMax Kellermann <max@duempel.org>2008-10-03 14:31:00 +0200
commitef040e296e46fcc7620edaf89ffac05e065ec3e3 (patch)
tree8836cbeb47208a2f949d6f44a093f795f03f37cb /src/screen.c
parent0b2eee9489a8acef3cdee6f6fa0df6d167c53b8d (diff)
downloadmpd-ef040e296e46fcc7620edaf89ffac05e065ec3e3.tar.gz
mpd-ef040e296e46fcc7620edaf89ffac05e065ec3e3.tar.xz
mpd-ef040e296e46fcc7620edaf89ffac05e065ec3e3.zip
screen: export the global variable "screen"
screen_t is a singleton. We do not have to pass it around everywhere. Export the one global variable.
Diffstat (limited to '')
-rw-r--r--src/screen.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/screen.c b/src/screen.c
index 5345f49ef..ea6d5d4ba 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -51,7 +51,7 @@ static const int SCREEN_MIN_ROWS = 5;
/* screens */
static gboolean welcome = TRUE;
-static struct screen screen;
+struct screen screen;
static const struct screen_functions *mode_fn = &screen_playlist;
static int seek_id = -1;
static int seek_target_time = 0;
@@ -79,7 +79,7 @@ screen_switch(const struct screen_functions *sf, struct mpdclient *c)
/* open the new mode */
if (mode_fn->open != NULL)
- mode_fn->open(&screen, c);
+ mode_fn->open(c);
screen_paint(c);
}
@@ -522,7 +522,7 @@ screen_init(mpdclient_t *c)
screen.main_window.cols, screen.main_window.rows);
if (mode_fn->open != NULL)
- mode_fn->open(&screen, c);
+ mode_fn->open(c);
/* initialize wreadln */
wrln_wgetch = my_wgetch;
@@ -764,7 +764,7 @@ screen_cmd(mpdclient_t *c, command_t cmd)
screen.last_cmd = cmd;
welcome = FALSE;
- if (mode_fn->cmd != NULL && mode_fn->cmd(&screen, c, cmd))
+ if (mode_fn->cmd != NULL && mode_fn->cmd(c, cmd))
return;
if (screen_client_cmd(c, cmd))