summaryrefslogtreecommitdiff
path: root/gba_memory.c
diff options
context:
space:
mode:
authorAutechre2021-02-24 03:58:08 +0100
committerGitHub2021-02-24 03:58:08 +0100
commit28aa08de9900000d2c42d903f8e5dfdbcdb55ea8 (patch)
treefd76187fc7def92e5ed31f7e28611f916a2d8f70 /gba_memory.c
parent300d0c0028e400eabd81dc718ee8cd8c6459b256 (diff)
parent349e47f0b251b42c7a3d7e2d8072ce976a55b54c (diff)
downloadpicogpsp-28aa08de9900000d2c42d903f8e5dfdbcdb55ea8.tar.gz
picogpsp-28aa08de9900000d2c42d903f8e5dfdbcdb55ea8.tar.bz2
picogpsp-28aa08de9900000d2c42d903f8e5dfdbcdb55ea8.zip
Merge pull request #94 from davidgfnet/master
Small fixes to division by zero
Diffstat (limited to 'gba_memory.c')
-rw-r--r--gba_memory.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gba_memory.c b/gba_memory.c
index 2cb760a..7675bb0 100644
--- a/gba_memory.c
+++ b/gba_memory.c
@@ -199,7 +199,7 @@ static void sound_control_x(u32 value)
#define sound_update_frequency_step(timer_number) \
timer[timer_number].frequency_step = \
- float_to_fp8_24(GBC_BASE_RATE / (timer_reload * sound_frequency)) \
+ float_to_fp8_24((GBC_BASE_RATE / sound_frequency) / (timer_reload)) \
/* Main */
extern timer_type timer[4];