mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Antony Pavlov <antonynpavlov@gmail.com>
To: barebox@lists.infradead.org
Subject: [PATCH] sandbox: eliminate sdl_init()
Date: Wed, 19 Oct 2016 11:44:37 +0300	[thread overview]
Message-ID: <20161019084437.7533-1-antonynpavlov@gmail.com> (raw)

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
---
 arch/sandbox/mach-sandbox/include/mach/linux.h | 1 -
 arch/sandbox/os/sdl.c                          | 7 +------
 2 files changed, 1 insertion(+), 7 deletions(-)

diff --git a/arch/sandbox/mach-sandbox/include/mach/linux.h b/arch/sandbox/mach-sandbox/include/mach/linux.h
index 1e53f69..1f11ed4 100644
--- a/arch/sandbox/mach-sandbox/include/mach/linux.h
+++ b/arch/sandbox/mach-sandbox/include/mach/linux.h
@@ -30,7 +30,6 @@ struct linux_console_data {
 
 extern int sdl_xres;
 extern int sdl_yres;
-int sdl_init(void);
 void sdl_close(void);
 int sdl_open(int xres, int yres, int bpp, void* buf);
 void sdl_stop_timer(void);
diff --git a/arch/sandbox/os/sdl.c b/arch/sandbox/os/sdl.c
index ec538e9..9a35279 100644
--- a/arch/sandbox/os/sdl.c
+++ b/arch/sandbox/os/sdl.c
@@ -23,11 +23,6 @@ static SDL_Surface *real_screen;
 static void *buffer = NULL;
 pthread_t th;
 
-int sdl_init(void)
-{
-	return SDL_Init(SDL_INIT_VIDEO | SDL_INIT_NOPARACHUTE);
-}
-
 static void sdl_copy_buffer(SDL_Surface *screen)
 {
 	if (SDL_MUSTLOCK(screen)) {
@@ -84,7 +79,7 @@ int sdl_open(int xres, int yres, int bpp, void* buf)
 {
 	int flags = SDL_HWSURFACE | SDL_ASYNCBLIT | SDL_HWACCEL;
 
-	if (sdl_init() < 0) {
+	if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_NOPARACHUTE) < 0) {
 		printf("Could not initialize SDL: %s.\n", SDL_GetError());
 		return -1;
 	}
-- 
2.9.3


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

             reply	other threads:[~2016-10-19  8:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-19  8:44 Antony Pavlov [this message]
2016-10-19 10:22 ` Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161019084437.7533-1-antonynpavlov@gmail.com \
    --to=antonynpavlov@gmail.com \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox