Skip to content

Commit

Permalink
Use correct VIDEO_BACKEND for Miyoo
Browse files Browse the repository at this point in the history
  • Loading branch information
m45t3r committed May 28, 2020
1 parent 435a5ef commit 10ed8be
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 30 deletions.
2 changes: 1 addition & 1 deletion Makefile.miyoo
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ GIT_VERSION := "$(shell git describe --abbrev=7 --dirty --always)"

PRGNAME = snes9x

VIDEO_BACKEND = retrostone
VIDEO_BACKEND = sdl
INPUT_BACKEND = sdl
SOUND_BACKEND = alsa

Expand Down
38 changes: 9 additions & 29 deletions shell/video/sdl/video_blit.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -51,42 +51,22 @@ 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();
}

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()
Expand All @@ -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:
Expand All @@ -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);
}

0 comments on commit 10ed8be

Please sign in to comment.