summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTuomas Virtanen <katajakasa@gmail.com>2018-11-15 01:12:02 +0200
committerTuomas Virtanen <katajakasa@gmail.com>2018-11-15 01:12:02 +0200
commit74bc63635ed16a0a4c67057d0abbba666bf2074f (patch)
tree2e26824098f9013ccb8bf618574e8a822e300abf
parent226878461cef5ecf265518a350d9559158152e37 (diff)
Limit thread count in complex example
-rw-r--r--examples/example_complex.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/example_complex.c b/examples/example_complex.c
index 9f5d8aa..779c879 100644
--- a/examples/example_complex.c
+++ b/examples/example_complex.c
@@ -109,7 +109,7 @@ int main(int argc, char *argv[]) {
}
// Allow Kit to use more threads
- Kit_SetHint(KIT_HINT_THREAD_COUNT, SDL_GetCPUCount());
+ Kit_SetHint(KIT_HINT_THREAD_COUNT, SDL_GetCPUCount() <= 4 ? SDL_GetCPUCount() : 4);
// Lots of buffers for smooth playback (will eat up more memory, too).
Kit_SetHint(KIT_HINT_VIDEO_BUFFER_FRAMES, 5);