decoder/gme: fix rounding error
Cast to integer after multiplying with 1000. Allows sub-second seeking.
This commit is contained in:
parent
8e31366431
commit
f84e288ad7
|
@ -189,7 +189,7 @@ gme_file_decode(struct decoder *decoder, const char *path_fs)
|
|||
cmd = decoder_data(decoder, nullptr, buf, sizeof(buf), 0);
|
||||
if (cmd == DECODE_COMMAND_SEEK) {
|
||||
float where = decoder_seek_where(decoder);
|
||||
gme_err = gme_seek(emu, (int)where * 1000);
|
||||
gme_err = gme_seek(emu, int(where * 1000));
|
||||
if (gme_err != nullptr)
|
||||
g_warning("%s", gme_err);
|
||||
decoder_command_finished(decoder);
|
||||
|
|
Loading…
Reference in New Issue