aboutsummaryrefslogtreecommitdiff
path: root/plugins/gpu_neon/vout_sdl.c
diff options
context:
space:
mode:
authornotaz2012-01-19 01:33:12 +0200
committernotaz2012-01-19 01:38:45 +0200
commit62d7fa9555924ab8e152b546711d27add640b102 (patch)
tree28c231a8f642d28d357bbdce9edb2b79e199764e /plugins/gpu_neon/vout_sdl.c
parent5d834c089ea695dba7643cba8686ce2ac06d8db4 (diff)
downloadpcsx_rearmed-62d7fa9555924ab8e152b546711d27add640b102.tar.gz
pcsx_rearmed-62d7fa9555924ab8e152b546711d27add640b102.tar.bz2
pcsx_rearmed-62d7fa9555924ab8e152b546711d27add640b102.zip
refactor gpu plugins and Makefiles
name common gpu code gpulib, reduce amount of copy-paste in plugin Makefiles
Diffstat (limited to 'plugins/gpu_neon/vout_sdl.c')
-rw-r--r--plugins/gpu_neon/vout_sdl.c95
1 files changed, 0 insertions, 95 deletions
diff --git a/plugins/gpu_neon/vout_sdl.c b/plugins/gpu_neon/vout_sdl.c
deleted file mode 100644
index db1ae96..0000000
--- a/plugins/gpu_neon/vout_sdl.c
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * (C) GraÅžvydas "notaz" Ignotas, 2011
- *
- * This work is licensed under the terms of any of these licenses
- * (at your option):
- * - GNU GPL, version 2 or later.
- * - GNU LGPL, version 2.1 or later.
- * See the COPYING file in the top-level directory.
- */
-
-#include <stdio.h>
-#include <SDL.h>
-#include <SDL_syswm.h>
-#include "gpu.h"
-
-static SDL_Surface *screen;
-static Display *x11_display;
-
-int vout_init(void)
-{
- SDL_SysWMinfo wminfo;
- int ret;
-
- ret = SDL_Init(SDL_INIT_VIDEO);
- if (ret != 0) {
- fprintf(stderr, "SDL_Init failed: %s\n", SDL_GetError());
- return ret;
- }
-
- screen = SDL_SetVideoMode(1024, 512, 32, 0);
- if (screen == NULL) {
- fprintf(stderr, "SDL_SetVideoMode failed: %s\n", SDL_GetError());
- SDL_Quit();
- return -1;
- }
-
- SDL_VERSION(&wminfo.version);
- ret = SDL_GetWMInfo(&wminfo);
- if (ret == 1)
- x11_display = wminfo.info.x11.display;
-
- return 0;
-}
-
-int vout_finish(void)
-{
- SDL_Quit();
- return 0;
-}
-
-void vout_update(void)
-{
- uint32_t *d;
- int i;
-
- SDL_LockSurface(screen);
- if (gpu.status.rgb24)
- {
- uint8_t *s;
- int y;
- for (y = 0; y < 512; y++) {
- s = (uint8_t *)gpu.vram + y * 2*1024;
- d = (uint32_t *)screen->pixels + y * 1024;
- for (i = 0; i < 1024 * 2 / 3; i++, s += 3)
- d[i] = (s[0] << 16) | (s[1] << 8) | s[2];
- }
- }
- else
- {
- uint16_t *s = gpu.vram;
- d = (uint32_t *)screen->pixels;
- for (i = 0; i < 1024 * 512; i++)
- d[i] = (((uint32_t)s[i] << 19) & 0xf80000) | ((s[i] << 6) & 0xf800) |
- ((s[i] >> 7) & 0xf8);
- }
- SDL_UnlockSurface(screen);
- SDL_UpdateRect(screen, 0, 0, 1024, 512);
-}
-
-long GPUopen(void **dpy)
-{
- *dpy = x11_display;
- return 0;
-}
-
-long GPUclose(void)
-{
- return 0;
-}
-
-void vout_set_config(const struct rearmed_cbs *cbs)
-{
-}
-
-// vim:shiftwidth=2:expandtab