X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=platform%2Fwin32%2Fplat.c;h=54af82924a1651378584e5ec2a9d0f3ad1904d2c;hb=ee3c39efd2cf51cd654b6240f6fb595673f10f45;hp=42c493beb87f316eea2a40b6a19946d5fc050421;hpb=45285368c0fad43f23f90888fde16106bdc0fd52;p=picodrive.git diff --git a/platform/win32/plat.c b/platform/win32/plat.c index 42c493b..54af829 100644 --- a/platform/win32/plat.c +++ b/platform/win32/plat.c @@ -1,3 +1,10 @@ +/* + * PicoDrive + * (C) notaz, 2009,2010 + * + * This work is licensed under the terms of MAME license. + * See COPYING file in the top-level directory. + */ #include #include @@ -11,8 +18,6 @@ #include "main.h" static unsigned short screen_buff[320 * 240]; -static unsigned char PicoDraw2FB_[(8+320) * (8+240+8)]; -unsigned char *PicoDraw2FB = PicoDraw2FB_; const char *renderer_names[] = { NULL }; const char *renderer_names32x[] = { NULL }; @@ -59,7 +64,6 @@ int plat_wait_event(int *fds_hnds, int count, int timeout_ms) void pemu_prep_defconfig(void) { memset(&defaultConfig, 0, sizeof(defaultConfig)); - defaultConfig.s_PicoOpt|= POPT_6BTN_PAD; // for xmen proto defaultConfig.s_PicoCDBuffers = 0; defaultConfig.Frameskip = 0; } @@ -71,7 +75,7 @@ void pemu_validate_config(void) void pemu_loop_prep(void) { PicoDrawSetOutFormat(PDF_RGB555, 1); - PicoDrawSetOutBuf(g_screen_ptr, g_screen_width * 2); + PicoDrawSetOutBuf(g_screen_ptr, g_screen_ppitch * 2); pemu_sound_start(); } @@ -119,7 +123,7 @@ static int sndbuff[2*44100/50/2 + 4]; static void update_sound(int len) { /* avoid writing audio when lagging behind to prevent audio lag */ - if (PicoSkipFrame != 2) + if (PicoIn.skipFrame != 2) DSoundUpdate(sndbuff, (currentConfig.EmuOpt & EOPT_NO_FRMLIMIT) ? 0 : 1); } @@ -127,7 +131,7 @@ void pemu_sound_start(void) { int ret; - PsndOut = NULL; + PicoIn.sndOut = NULL; currentConfig.EmuOpt &= ~EOPT_EXT_FRMLIMIT; // prepare sound stuff @@ -135,14 +139,14 @@ void pemu_sound_start(void) { PsndRerate(0); - ret = DSoundInit(FrameWnd, PsndRate, (PicoOpt & POPT_EN_STEREO) ? 1 : 0, PsndLen); + ret = DSoundInit(FrameWnd, PicoIn.sndRate, (PicoIn.opt & POPT_EN_STEREO) ? 1 : 0, Pico.snd.len); if (ret != 0) { lprintf("dsound init failed\n"); return; } - PsndOut = (void *)sndbuff; - PicoWriteSound = update_sound; + PicoIn.sndOut = (void *)sndbuff; + PicoIn.writeSound = update_sound; currentConfig.EmuOpt |= EOPT_EXT_FRMLIMIT; } }