diff options
author | Franklin Wei <franklin@rockbox.org> | 2019-08-05 21:00:02 -0400 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2024-10-27 10:23:57 -0400 |
commit | 655d201cf31a852000b63887f291426b7f8c397b (patch) | |
tree | 47d3cad452ff86d5b050931e60a1ce02c15a2f5c /apps/plugins/sdl/progs | |
parent | 54b3b6f7978b6ffe4fbba8ad8fec73480ca45a4d (diff) | |
download | rockbox-655d201cf31a852000b63887f291426b7f8c397b.tar.gz rockbox-655d201cf31a852000b63887f291426b7f8c397b.zip |
quake: add a bunch more yield calls
Probably a bit too many, but good for making sound not skip.
Change-Id: I6657dcb4e8e7bb32c6550e2c5e3cee74d79b9ebe
Diffstat (limited to 'apps/plugins/sdl/progs')
-rw-r--r-- | apps/plugins/sdl/progs/quake/r_main.c | 6 | ||||
-rw-r--r-- | apps/plugins/sdl/progs/quake/r_part.c | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/apps/plugins/sdl/progs/quake/r_main.c b/apps/plugins/sdl/progs/quake/r_main.c index 4aa14d69da..a7133d1f9a 100644 --- a/apps/plugins/sdl/progs/quake/r_main.c +++ b/apps/plugins/sdl/progs/quake/r_main.c | |||
@@ -1018,12 +1018,15 @@ void R_RenderView_ (void) | |||
1018 | 1018 | ||
1019 | R_SetupFrame (); | 1019 | R_SetupFrame (); |
1020 | 1020 | ||
1021 | rb->yield(); // let sound run | ||
1021 | #ifdef PASSAGES | 1022 | #ifdef PASSAGES |
1022 | SetVisibilityByPassages (); | 1023 | SetVisibilityByPassages (); |
1023 | #else | 1024 | #else |
1024 | R_MarkLeaves (); // done here so we know if we're in water | 1025 | R_MarkLeaves (); // done here so we know if we're in water |
1025 | #endif | 1026 | #endif |
1026 | 1027 | ||
1028 | rb->yield(); // let sound run | ||
1029 | |||
1027 | // make FDIV fast. This reduces timing precision after we've been running for a | 1030 | // make FDIV fast. This reduces timing precision after we've been running for a |
1028 | // while, so we don't do it globally. This also sets chop mode, and we do it | 1031 | // while, so we don't do it globally. This also sets chop mode, and we do it |
1029 | // here so that setup stuff like the refresh area calculations match what's | 1032 | // here so that setup stuff like the refresh area calculations match what's |
@@ -1057,6 +1060,7 @@ SetVisibilityByPassages (); | |||
1057 | de_time1 = se_time2; | 1060 | de_time1 = se_time2; |
1058 | } | 1061 | } |
1059 | 1062 | ||
1063 | rb->yield(); // let sound run | ||
1060 | R_DrawEntitiesOnList (); | 1064 | R_DrawEntitiesOnList (); |
1061 | 1065 | ||
1062 | if (r_dspeeds.value) | 1066 | if (r_dspeeds.value) |
@@ -1065,6 +1069,7 @@ SetVisibilityByPassages (); | |||
1065 | dv_time1 = de_time2; | 1069 | dv_time1 = de_time2; |
1066 | } | 1070 | } |
1067 | 1071 | ||
1072 | rb->yield(); // let sound run | ||
1068 | R_DrawViewModel (); | 1073 | R_DrawViewModel (); |
1069 | 1074 | ||
1070 | if (r_dspeeds.value) | 1075 | if (r_dspeeds.value) |
@@ -1072,6 +1077,7 @@ SetVisibilityByPassages (); | |||
1072 | dv_time2 = Sys_FloatTime (); | 1077 | dv_time2 = Sys_FloatTime (); |
1073 | dp_time1 = Sys_FloatTime (); | 1078 | dp_time1 = Sys_FloatTime (); |
1074 | } | 1079 | } |
1080 | rb->yield(); // let sound run | ||
1075 | 1081 | ||
1076 | R_DrawParticles (); | 1082 | R_DrawParticles (); |
1077 | 1083 | ||
diff --git a/apps/plugins/sdl/progs/quake/r_part.c b/apps/plugins/sdl/progs/quake/r_part.c index 8c0dcff5e8..4895a828c0 100644 --- a/apps/plugins/sdl/progs/quake/r_part.c +++ b/apps/plugins/sdl/progs/quake/r_part.c | |||
@@ -696,8 +696,14 @@ void R_DrawParticles (void) | |||
696 | break; | 696 | break; |
697 | } | 697 | } |
698 | 698 | ||
699 | rb->yield(); | ||
700 | |||
701 | int cnt = 0; | ||
702 | |||
699 | for (p=active_particles ; p ; p=p->next) | 703 | for (p=active_particles ; p ; p=p->next) |
700 | { | 704 | { |
705 | if(!(++cnt%50)) | ||
706 | rb->yield(); | ||
701 | for ( ;; ) | 707 | for ( ;; ) |
702 | { | 708 | { |
703 | kill = p->next; | 709 | kill = p->next; |