Commit graph

2191 commits

Author SHA1 Message Date
Ilari Liusvaara 7d9b3e93ec Track all window size changes while in fullscreen 2018-01-08 04:24:45 +02:00
Ilari Liusvaara 3dee7b756a Delay committing fullscreen until seeing window size change
Hopefully gets rid of race condition in fullscreening the emulator.
2018-01-08 01:51:43 +02:00
Ilari Liusvaara 323db52b6b Add <functional> to files that use std::function 2017-10-26 04:41:20 +03:00
Ilari Liusvaara f49b82c989 Bus fixes: Reading of CPU MMIO registers does not update MDR
Also fixes controller timings to be more realistic.
2017-10-25 14:22:19 +03:00
Ilari Liusvaara 6fd18bd0f0 Make wrapper for boost::lexical_cast
This makes it easier to eventually get rid of boost::lexical_cast.
2017-10-25 14:11:43 +03:00
Ilari Liusvaara b5f3e543d8 De-header SNES games with headers submultiple of 512 bytes correctly 2017-08-30 19:06:51 +03:00
Ilari Liusvaara 4c6338888d Save: Fix issues with adding an extension if missing
- The code should search for the last '.', not the first.
- Case-insensitively compare the extensions.
2017-08-08 09:48:53 +03:00
Rodrigo A. do Amaral 9318e4de94 Lua (d)bitmap: add hflip and vflip functions 2017-07-14 06:07:03 +03:00
Ilari Liusvaara 298610752b Specialize (D)BITMAP:sample_texture when s is power of two 2017-07-13 20:27:38 +03:00
Ilari Liusvaara f85cdab6c5 Linear transformed texture sampling for (d)bitmap 2017-07-13 15:44:52 +03:00
Ilari Liusvaara dd18168993 Fix few uninitialized variables and a stack smash in AVI dumper
- Fix uninitialized closed flag in avi_worker
- Fix uninitialized stream parameters in avi_writer
- Fix stack smash in AVI write_pkt (the padding is only 2 bytes, don't
  write an u32 into it!)
2017-05-29 17:32:09 +03:00
Ilari Liusvaara 7be5215c08 When redrawing screen, read the last written frame
This should fix the bug with loadstates, where wrong screenshot was
displayed in certain race condition.
2017-05-23 11:11:32 +03:00
Ilari Liusvaara 8ac8304824 Lua: Fix type confusion between signed and unsigned
This bug seemed to cause all hell to break lose with negative numbers
2017-04-18 19:25:07 +03:00
Ilari Liusvaara c2e40c4cd3 Support uncompressing ZIP compression method 12 (bzip2) 2017-02-05 17:15:57 +02:00
Ilari Liusvaara 669381821e PIX_FMT_* constants are deprecated, use AV_PIX_FMT_* instead 2017-01-24 16:28:57 +02:00
Ilari Liusvaara c5d441c6b0 Fix crash if text containing \n is printed at nonzero x 2016-09-18 23:00:13 +03:00
Ilari Liusvaara 5544b9ba12 Don't try to enter loadstate with loadstate already in progress 2016-08-09 18:59:25 +03:00
Ilari Liusvaara 4c9bb20270 Fix crash if mouse_x or mouse_y are hooked
Turns out framebuffer draw recalibrates mouse_x and mouse_y, which then
calls into hook. Which is no-no, because framebuffer draw runs in GUI
thread, and hooks must run in game thread.
2016-07-23 11:16:34 +03:00
Ilari Liusvaara eb6ff6c38b Virtualize audio system for instances 2016-04-17 10:14:05 +03:00
Ilari Liusvaara 7903ba1fda Small cleanup: move up some lsnes_instance stuff 2016-04-16 10:51:02 +03:00
Ilari Liusvaara 40ac5d56e3 Some new hotkeys
- Flush slotinfo cache
- Reload current ROM
- Close current ROM
- Increase speed
- Decrease speed
2016-04-15 12:50:15 +03:00
Ilari Liusvaara a3f1d7c8a4 Lua Add getters for various paths 2016-04-15 09:18:48 +03:00
Ilari Liusvaara d287f64c14 Allow modifying button to be autofire/autohold/typed 2016-04-14 20:22:13 +03:00
Ilari Liusvaara 62ee8b0039 Don't try to uninstall handlers for active core
Should stop the Gambatte/Bsnes SGB core from crashing on exit.
2016-01-01 08:01:16 +02:00
Ilari Liusvaara 05ad5b9da1 Fix "empty path points to root" bug
Unset paths are supposed to point to the current directory, not the
root.
2016-01-01 07:57:48 +02:00
Ilari Liusvaara 019fbc2646 bsnes: Add Lua function to dump 2bpp sprites (and allow 4-color palettes) 2015-12-29 03:01:46 +02:00
Ilari Liusvaara 3da2e26e1b Add bit.fextract, bit.bfields 2015-12-24 21:26:12 +02:00
Ilari Liusvaara 610685db0f Fix Valgrind warning about uninitialized variable 2015-12-15 04:17:53 +02:00
Ilari Liusvaara 6a580bb332 Add regex sanity checks on startup and add --sanity-check 2015-12-15 04:17:11 +02:00
Ilari Liusvaara fa3e5b6751 Nuke last remains of boost::regex from outside string.cpp 2015-12-11 19:42:35 +02:00
Ilari Liusvaara 813449ac1b Fix compilation with Lua 5.1
Apparently Lua 5.1 doesn't have LUA_OK (0).
2015-11-05 00:22:11 +02:00
Ilari Liusvaara ff697846d1 Fix crash if loading type0 PNG without tRNS chunk 2015-10-26 21:38:36 +02:00
Ilari Liusvaara 476f79f14a Fix disassembly of SNES BRL instruction 2015-10-26 21:20:25 +02:00
Ilari Liusvaara e9e00fd881 Fix help for +tangent/-tangent to be less obscure 2015-10-04 05:31:11 +03:00
Ilari Liusvaara 51bbbd1772 When loading gamepaks, use #1 as MSU-1 base only if system has BIOS 2015-09-07 21:01:15 +03:00
Ilari Liusvaara 1834c61dfb Fix MSU-1 bug where write to MSU1BASE+4 is mirred to MSUBASE+5 2015-09-07 20:52:01 +03:00
Ilari Liusvaara 5ab3b133a4 Fix bsnes compilation for GCC 5.X 2015-08-08 11:13:39 +03:00
Ilari Liusvaara 918dc6db7b Fix gamepad reset
Don't create duplicate keys for gamepads during reset (causing those
keys to stop working) and properly offline all buttons and axes in
gamepad that is offlined.
2015-08-01 00:25:37 +03:00
Ilari Liusvaara 97ba0292d6 Fix crash on loading invalid PNG files
(Just a divide by zero)
2015-07-25 17:23:59 +03:00
Ilari Liusvaara d8048863e8 movie::frame_subframes: Gracefully handle invalid frame numbers
Doesn't fix cache invalidation errors tho.
2015-07-04 12:18:11 +03:00
Ilari Liusvaara 6d1a67719b Add movie.subframe_to_frame 2015-07-03 22:24:47 +03:00
Ilari Liusvaara 5e73a844a9 Fix do_load_rom() in readonly case 2015-06-29 20:56:04 +03:00
Ilari Liusvaara 4a4c71acf4 ss_int24_t and ss_uint24_t are integers
Fixes memory.readhword pushing the result as a float instead of integer.
2015-06-27 02:45:43 +03:00
Ilari Liusvaara 957738035f Use standard bitmap composition for rendered text bitmaps 2015-06-24 12:54:45 +03:00
Ilari Liusvaara 859d60513f Merge some common drawing code between bitmaps and tilemaps 2015-06-23 14:46:14 +03:00
Ilari Liusvaara 7ada70888f Cleanup bitmap and tilemap rendering a bit 2015-06-23 14:32:59 +03:00
Ilari Liusvaara 250679f656 Merge remote-tracking branch 'origin/master' 2015-06-23 13:46:21 +03:00
Ilari Liusvaara 2e609624fa Remove bogus comments in gui-tilemap.cpp
size_t can't overrun as a pointer.
2015-06-23 13:45:47 +03:00
Ilari Liusvaara daa5ca41e9 Close the ROM on quit to avoid crashes 2015-06-21 09:12:03 +03:00
Ilari Liusvaara 4a4004d3f8 Fix build breakage on Win32 2015-06-16 21:23:14 +03:00