ViRGE S3D triangle rendering now uses worker thread.

Fixed clipping bug on ViRGE.
Fixed status window crash.
This commit is contained in:
TomW 2014-07-22 21:10:39 +01:00
commit 1c3d1039ff
22 changed files with 462 additions and 305 deletions

View file

@ -2278,10 +2278,9 @@ void mach64_force_redraw(void *p)
mach64->svga.fullchange = changeframecount;
}
int mach64_add_status_info(char *s, int max_len, void *p)
void mach64_add_status_info(char *s, int max_len, void *p)
{
mach64_t *mach64 = (mach64_t *)p;
int cur_len = max_len;
if (((mach64->crtc_gen_cntl >> 24) & 3) == 3)
{
@ -2289,8 +2288,7 @@ int mach64_add_status_info(char *s, int max_len, void *p)
char temps[128];
int bpp = 4;
strncat(s, "Mach64 in native mode\n", cur_len);
cur_len -= strlen("Mach64 in native mode\n");
strncat(s, "Mach64 in native mode\n", max_len);
switch ((mach64->crtc_gen_cntl >> 8) & 7)
{
@ -2303,25 +2301,19 @@ int mach64_add_status_info(char *s, int max_len, void *p)
}
sprintf(temps, "Mach64 colour depth : %i bpp\n", bpp);
strncat(s, temps, cur_len);
cur_len -= strlen(temps);
strncat(s, temps, max_len);
sprintf(temps, "Mach64 resolution : %i x %i\n", svga->hdisp, svga->dispend);
strncat(s, temps, cur_len);
cur_len -= strlen(temps);
strncat(s, temps, max_len);
sprintf(temps, "Mach64 refresh rate : %i Hz\n\n", svga->frames);
svga->frames = 0;
strncat(s, temps, cur_len);
cur_len -= strlen(temps);
return max_len - cur_len;
strncat(s, temps, max_len);
}
else
{
strncat(s, "Mach64 in SVGA mode\n", cur_len);
cur_len -= strlen("Mach64 in SVGA mode\n");
return svga_add_status_info(s, cur_len, &mach64->svga);
strncat(s, "Mach64 in SVGA mode\n", max_len);
svga_add_status_info(s, max_len, &mach64->svga);
}
}