aboutsummaryrefslogtreecommitdiff
path: root/shell/video/sdl
diff options
context:
space:
mode:
authorgameblabla2020-10-16 03:17:52 +0000
committerGitHub2020-10-16 03:17:52 +0000
commit9ea18f315c385ec85cb28d44659b45589cfc9ac0 (patch)
tree3661b6ec35f5900070acebc38fd975fb5f9cf84b /shell/video/sdl
parent1a51fa791356b52a88e8ae0e6941034b23cd354f (diff)
parent94b1765da3dd2b5121650e99e194020fb3c5b4b6 (diff)
downloadsnesemu-9ea18f315c385ec85cb28d44659b45589cfc9ac0.tar.gz
snesemu-9ea18f315c385ec85cb28d44659b45589cfc9ac0.tar.bz2
snesemu-9ea18f315c385ec85cb28d44659b45589cfc9ac0.zip
Merge pull request #1 from m45t3r/master
I am merging this because it has the new color opts
Diffstat (limited to 'shell/video/sdl')
-rw-r--r--shell/video/sdl/video_blit.c38
1 files changed, 9 insertions, 29 deletions
diff --git a/shell/video/sdl/video_blit.c b/shell/video/sdl/video_blit.c
index fef7033..b4a6bbe 100644
--- a/shell/video/sdl/video_blit.c
+++ b/shell/video/sdl/video_blit.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-
+
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
@@ -51,11 +51,11 @@ uint32_t* Draw_to_Virtual_Screen;
void Init_Video()
{
SDL_Init( SDL_INIT_VIDEO );
-
+
SDL_ShowCursor(0);
-
- sdl_screen = SDL_SetVideoMode(HOST_WIDTH_RESOLUTION, HOST_HEIGHT_RESOLUTION, 16, SDL_HWSURFACE);
-
+
+ sdl_screen = SDL_SetVideoMode(0, 0, 16, SDL_HWSURFACE);
+
backbuffer = SDL_CreateRGBSurface(SDL_SWSURFACE, 320, 240, 16, 0,0,0,0);
Set_Video_InGame();
@@ -63,30 +63,10 @@ void Init_Video()
void Set_Video_Menu()
{
- /*if (sdl_screen->w != HOST_WIDTH_RESOLUTION)
- {
- sdl_screen = SDL_SetVideoMode(HOST_WIDTH_RESOLUTION, HOST_HEIGHT_RESOLUTION, 16, SDL_HWSURFACE);
- }*/
}
void Set_Video_InGame()
{
- /*switch(option.fullscreen)
- {
- // Native
- #ifdef SUPPORT_NATIVE_RESOLUTION
- case 0:
- if (sdl_screen->w != INTERNAL_WSWAN_WIDTH) sdl_screen = SDL_SetVideoMode(IPPU.RenderedScreenWidth, IPPU.RenderedScreenHeight, 16, SDL_HWSURFACE);
- Draw_to_Virtual_Screen = sdl_screen->pixels;
- width_of_surface = sdl_screen->w;
- break;
- #endif
- default:
- if (sdl_screen->w != HOST_WIDTH_RESOLUTION) sdl_screen = SDL_SetVideoMode(HOST_WIDTH_RESOLUTION, HOST_HEIGHT_RESOLUTION, 16, SDL_HWSURFACE);
- Draw_to_Virtual_Screen = wswan_vs->pixels;
- width_of_surface = INTERNAL_WSWAN_WIDTH;
- break;
- }*/
}
void Video_Close()
@@ -106,9 +86,9 @@ void Update_Video_Ingame()
uint32_t *s, *d;
uint32_t h, w;
uint8_t PAL = !!(Memory.FillRAM[0x2133] & 4);
-
+
SDL_LockSurface(sdl_screen);
-
+
switch(option.fullscreen)
{
case 0:
@@ -126,7 +106,7 @@ void Update_Video_Ingame()
break;
}
//bitmap_scale(0, 0, IPPU.RenderedScreenWidth, IPPU.RenderedScreenHeight, sdl_screen->w, sdl_screen->h, SNES_WIDTH*2, 0, GFX.Screen, sdl_screen->pixels);
-
- SDL_UnlockSurface(sdl_screen);
+
+ SDL_UnlockSurface(sdl_screen);
SDL_Flip(sdl_screen);
}