mirror of
https://github.com/Stichting-MINIX-Research-Foundation/pkgsrc-ng.git
synced 2025-09-22 11:04:51 -04:00
45 lines
1005 B
Plaintext
45 lines
1005 B
Plaintext
$NetBSD: patch-af,v 1.1 2005/10/30 11:47:56 wiz Exp $
|
|
|
|
Fix display and sync on sound. Ignore NoWaiting and the rest for now.
|
|
|
|
--- src/drivers/pc/main.c.orig 2004-09-16 04:55:00.000000000 +0200
|
|
+++ src/drivers/pc/main.c
|
|
@@ -466,14 +466,26 @@ void FCEUD_Update(uint8 *XBuf, int32 *Bu
|
|
if(can > Count) can=Count;
|
|
else uflow=0;
|
|
|
|
- WriteSound(Buffer,can);
|
|
+ while (Count > 0) {
|
|
+ WriteSound(Buffer,can);
|
|
+ Count -= can;
|
|
+ Buffer += can;
|
|
+ if (Count == 0)
|
|
+ break;
|
|
+ SDL_Delay(1);
|
|
+ can = GetWriteSound();
|
|
+ if(can > Count) can=Count;
|
|
+ }
|
|
|
|
+ if(XBuf && (inited&4) && !(NoWaiting & 2))
|
|
+ BlitScreen(XBuf);
|
|
+ else
|
|
+ printf("skipped\n");
|
|
+#if 0
|
|
//if(uflow) puts("Underflow");
|
|
tmpcan = GetWriteSound();
|
|
if((tmpcan < Count*0.90) && !uflow)
|
|
{
|
|
- if(XBuf && (inited&4) && !(NoWaiting & 2))
|
|
- BlitScreen(XBuf);
|
|
Buffer+=can;
|
|
Count-=can;
|
|
if(Count)
|
|
@@ -499,6 +511,7 @@ void FCEUD_Update(uint8 *XBuf, int32 *Bu
|
|
}
|
|
#endif
|
|
|
|
+#endif
|
|
}
|
|
else
|
|
{
|