Commit Graph

607 Commits

Author SHA1 Message Date
David Korth
19a4f36035 [librptexture/tests] ImageDecoderLinearTest: Use le16_to_cpu(), not le32_to_cpu(), for the 15-bit/16-bit tests.
On BE systems, using le32_to_cpu() causes the 16-bit data to be moved to
the high word. The 32-bit value is then truncated when passing it to the
16-bit PixelConversion function, resulting in a pixel value of 0x0000.

This fixes all of the 15-bit/16-bit tests

Previously, these tests were failing:

[  FAILED  ] 44 tests, listed below:
[  FAILED  ] fromLinear16/ImageDecoderLinearTest.fromLinear_cpp_test/RGB565_0xFF1045A5, where GetParam() = RGB565_0xFF1045A5
[  FAILED  ] fromLinear16/ImageDecoderLinearTest.fromLinear_cpp_test/BGR565_0xFF1045A5, where GetParam() = BGR565_0xFF1045A5
[  FAILED  ] fromLinear16/ImageDecoderLinearTest.fromLinear_cpp_test/ARGB4444_0x11223344, where GetParam() = ARGB4444_0x11223344
[  FAILED  ] fromLinear16/ImageDecoderLinearTest.fromLinear_cpp_test/ABGR4444_0x11223344, where GetParam() = ABGR4444_0x11223344
[  FAILED  ] fromLinear16/ImageDecoderLinearTest.fromLinear_cpp_test/RGBA4444_0x11223344, where GetParam() = RGBA4444_0x11223344
[  FAILED  ] fromLinear16/ImageDecoderLinearTest.fromLinear_cpp_test/BGRA4444_0x11223344, where GetParam() = BGRA4444_0x11223344
[  FAILED  ] fromLinear16/ImageDecoderLinearTest.fromLinear_cpp_test/xRGB4444_0xFF223344, where GetParam() = xRGB4444_0xFF223344
[  FAILED  ] fromLinear16/ImageDecoderLinearTest.fromLinear_cpp_test/xBGR4444_0xFF223344, where GetParam() = xBGR4444_0xFF223344
[  FAILED  ] fromLinear16/ImageDecoderLinearTest.fromLinear_cpp_test/RGBx4444_0xFF223344, where GetParam() = RGBx4444_0xFF223344
[  FAILED  ] fromLinear16/ImageDecoderLinearTest.fromLinear_cpp_test/BGRx4444_0xFF223344, where GetParam() = BGRx4444_0xFF223344
[  FAILED  ] fromLinear16/ImageDecoderLinearTest.fromLinear_cpp_test/ARGB1555_0x00218CA5, where GetParam() = ARGB1555_0x00218CA5
[  FAILED  ] fromLinear16/ImageDecoderLinearTest.fromLinear_cpp_test/ABGR1555_0x00218CA5, where GetParam() = ABGR1555_0x00218CA5
[  FAILED  ] fromLinear16/ImageDecoderLinearTest.fromLinear_cpp_test/ARGB1555_0xFF218CA5, where GetParam() = ARGB1555_0xFF218CA5
[  FAILED  ] fromLinear16/ImageDecoderLinearTest.fromLinear_cpp_test/ABGR1555_0xFF218CA5, where GetParam() = ABGR1555_0xFF218CA5
[  FAILED  ] fromLinear16/ImageDecoderLinearTest.fromLinear_cpp_test/RGBA5551_0x00426384, where GetParam() = RGBA5551_0x00426384
[  FAILED  ] fromLinear16/ImageDecoderLinearTest.fromLinear_cpp_test/BGRA5551_0x00426384, where GetParam() = BGRA5551_0x00426384
[  FAILED  ] fromLinear16/ImageDecoderLinearTest.fromLinear_cpp_test/RGBA5551_0xFF426384, where GetParam() = RGBA5551_0xFF426384
[  FAILED  ] fromLinear16/ImageDecoderLinearTest.fromLinear_cpp_test/BGRA5551_0xFF426384, where GetParam() = BGRA5551_0xFF426384
[  FAILED  ] fromLinear16/ImageDecoderLinearTest.fromLinear_cpp_test/RG88_0xFF123400, where GetParam() = RG88_0xFF123400
[  FAILED  ] fromLinear16/ImageDecoderLinearTest.fromLinear_cpp_test/GR88_0xFF123400, where GetParam() = GR88_0xFF123400
[  FAILED  ] fromLinear16/ImageDecoderLinearTest.fromLinear_cpp_test/RGB555_0xFF218CA5, where GetParam() = RGB555_0xFF218CA5
[  FAILED  ] fromLinear16/ImageDecoderLinearTest.fromLinear_cpp_test/BGR555_0xFF218CA5, where GetParam() = BGR555_0xFF218CA5
[  FAILED  ] fromLinear16_384/ImageDecoderLinearTest.fromLinear_cpp_test/RGB565_0xFF1045A5, where GetParam() = RGB565_0xFF1045A5
[  FAILED  ] fromLinear16_384/ImageDecoderLinearTest.fromLinear_cpp_test/BGR565_0xFF1045A5, where GetParam() = BGR565_0xFF1045A5
[  FAILED  ] fromLinear16_384/ImageDecoderLinearTest.fromLinear_cpp_test/ARGB4444_0x11223344, where GetParam() = ARGB4444_0x11223344
[  FAILED  ] fromLinear16_384/ImageDecoderLinearTest.fromLinear_cpp_test/ABGR4444_0x11223344, where GetParam() = ABGR4444_0x11223344
[  FAILED  ] fromLinear16_384/ImageDecoderLinearTest.fromLinear_cpp_test/RGBA4444_0x11223344, where GetParam() = RGBA4444_0x11223344
[  FAILED  ] fromLinear16_384/ImageDecoderLinearTest.fromLinear_cpp_test/BGRA4444_0x11223344, where GetParam() = BGRA4444_0x11223344
[  FAILED  ] fromLinear16_384/ImageDecoderLinearTest.fromLinear_cpp_test/xRGB4444_0xFF223344, where GetParam() = xRGB4444_0xFF223344
[  FAILED  ] fromLinear16_384/ImageDecoderLinearTest.fromLinear_cpp_test/xBGR4444_0xFF223344, where GetParam() = xBGR4444_0xFF223344
[  FAILED  ] fromLinear16_384/ImageDecoderLinearTest.fromLinear_cpp_test/RGBx4444_0xFF223344, where GetParam() = RGBx4444_0xFF223344
[  FAILED  ] fromLinear16_384/ImageDecoderLinearTest.fromLinear_cpp_test/BGRx4444_0xFF223344, where GetParam() = BGRx4444_0xFF223344
[  FAILED  ] fromLinear16_384/ImageDecoderLinearTest.fromLinear_cpp_test/ARGB1555_0x00218CA5, where GetParam() = ARGB1555_0x00218CA5
[  FAILED  ] fromLinear16_384/ImageDecoderLinearTest.fromLinear_cpp_test/ABGR1555_0x00218CA5, where GetParam() = ABGR1555_0x00218CA5
[  FAILED  ] fromLinear16_384/ImageDecoderLinearTest.fromLinear_cpp_test/ARGB1555_0xFF218CA5, where GetParam() = ARGB1555_0xFF218CA5
[  FAILED  ] fromLinear16_384/ImageDecoderLinearTest.fromLinear_cpp_test/ABGR1555_0xFF218CA5, where GetParam() = ABGR1555_0xFF218CA5
[  FAILED  ] fromLinear16_384/ImageDecoderLinearTest.fromLinear_cpp_test/RGBA5551_0x00426384, where GetParam() = RGBA5551_0x00426384
[  FAILED  ] fromLinear16_384/ImageDecoderLinearTest.fromLinear_cpp_test/BGRA5551_0x00426384, where GetParam() = BGRA5551_0x00426384
[  FAILED  ] fromLinear16_384/ImageDecoderLinearTest.fromLinear_cpp_test/RGBA5551_0xFF426384, where GetParam() = RGBA5551_0xFF426384
[  FAILED  ] fromLinear16_384/ImageDecoderLinearTest.fromLinear_cpp_test/BGRA5551_0xFF426384, where GetParam() = BGRA5551_0xFF426384
[  FAILED  ] fromLinear16_384/ImageDecoderLinearTest.fromLinear_cpp_test/RG88_0xFF123400, where GetParam() = RG88_0xFF123400
[  FAILED  ] fromLinear16_384/ImageDecoderLinearTest.fromLinear_cpp_test/GR88_0xFF123400, where GetParam() = GR88_0xFF123400
[  FAILED  ] fromLinear16_384/ImageDecoderLinearTest.fromLinear_cpp_test/RGB555_0xFF218CA5, where GetParam() = RGB555_0xFF218CA5
[  FAILED  ] fromLinear16_384/ImageDecoderLinearTest.fromLinear_cpp_test/BGR555_0xFF218CA5, where GetParam() = BGR555_0xFF218CA5

FIXME: The 24-bit tests are still failing:
[  FAILED  ] 4 tests, listed below:
[  FAILED  ] fromLinear24/ImageDecoderLinearTest.fromLinear_cpp_test/RGB888_0xFF123456, where GetParam() = RGB888_0xFF123456
[  FAILED  ] fromLinear24/ImageDecoderLinearTest.fromLinear_cpp_test/BGR888_0xFF123456, where GetParam() = BGR888_0xFF123456
[  FAILED  ] fromLinear24_stride512/ImageDecoderLinearTest.fromLinear_cpp_test/RGB888_0xFF123456, where GetParam() = RGB888_0xFF123456
[  FAILED  ] fromLinear24_stride512/ImageDecoderLinearTest.fromLinear_cpp_test/BGR888_0xFF123456, where GetParam() = BGR888_0xFF123456
2024-03-10 04:44:33 -04:00
David Korth
e184e25cca [gtk] DragImage: gtk_popover_set_transitions_enabled() was added in GTK+ 3.15.8.
Debian 8 has GTK+ 3.14.5, so this caused the build to fail.

Check for GTK+ [3.15.8, 3.21.5). If it's anywhere in that range,
use gtk_popover_set_transitions_enabled(); otherwise, don't.
2024-03-10 04:38:43 -04:00
David Korth
39826747b2 [librptexture] rp_image::swizzle_cpp(): Fix swizzling on big-endian systems.
On LE, we need to rotate the channels value right by 8 bits.
On BE, we need to rotate the channels value *left* by 8 bits.

Remove be32_to_cpu() and adjust the SWZ_CH_? values to use the big-endian
values (B=3,G=2,R=1,A=0) on both BE and LE.

This fixes the following (and only) test failures on RomHeaderTest
on Debian 8 on PowerPC (via qemu):

[  FAILED  ] 3 tests, listed below:
[  FAILED  ] DDS_Blender/ImageDecoderTest.decodeTest/DDS_Blender_tex_cmp_bc3nm_dds_gz_Image, where GetParam() = DDS_Blender/tex_cmp_bc3nm.dds.gz
[  FAILED  ] DDS_Blender/ImageDecoderTest.decodeTest/DDS_Blender_tex_cmp_bc3rxgb_dds_gz_Image, where GetParam() = DDS_Blender/tex_cmp_bc3rxgb.dds.gz
[  FAILED  ] KTX2/ImageDecoderTest.decodeTest/KTX2_luminance_alpha_reference_u_ktx2_gz_Image, where GetParam() = KTX2/luminance_alpha_reference_u.ktx2.gz
2024-03-10 04:15:50 -04:00
David Korth
fbb9d20da7 [libromdata] DreamcastSave: Fix byteswapping on big-endian.
The byteswapping code was checking for SYS_LIL_ENDIAN, which means it
was only compiled in on little-endian systems, not big-endian systems.
The le*_to_cpu() macros are no-ops on little-endian systems, so it
didn't cause a problem on LE, but it broke on BE.

This fixes the following (and only) test failures on RomHeaderTest
on Debian 8 on PowerPC (via qemu):

[  FAILED  ] 4 tests, listed below:
[  FAILED  ] DreamcastSave/RomHeaderTest.Text/BIOS002_VMS, where GetParam() = BIOS002.VMS
[  FAILED  ] DreamcastSave/RomHeaderTest.Text/SONIC2C_VMS, where GetParam() = SONIC2C.VMS
[  FAILED  ] DreamcastSave/RomHeaderTest.JSON/BIOS002_VMS, where GetParam() = BIOS002.VMS
[  FAILED  ] DreamcastSave/RomHeaderTest.JSON/SONIC2C_VMS, where GetParam() = SONIC2C.VMS
2024-03-10 03:57:26 -04:00
David Korth
9d282b593c NEWS.md: Mention #407. 2024-03-09 14:31:27 -05:00
David Korth
5199a9c040 NEWS.md: Mention PalmOS. 2024-03-09 13:50:07 -05:00
David Korth
11710a6231 NEWS.md: The bug causing the Directory Opus crash first showed up in v1.7. 2024-03-04 20:51:57 -05:00
David Korth
205c81c885 [win32] RP_ShellPropSheetExt_Private::SubtabDlgProc(): Return FALSE instead of calling DefSubclassProc().
This *usually* didn't cause any problems when using Windows Explorer,
but Directory Opus appears to do its own subclassing. The end result
is Directory Opus crashes when selecting the rom-properties tab in
file properties.

NOTE: Since it's a dialog procedure, it needs to return FALSE instead of
calling DefWindowProc, and definitely not DefDlgProc.

As per MSDN: https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-defdlgprocw

The **DefDlgProc** function must not be called by a dialog box procedure;
doing so results in recursive execution.

Fixes #405: Crash when used inside Directory Opus
Reported by @Kugelblitz360.
2024-03-04 20:46:26 -05:00
David Korth
8b072cfc4b NEWS.md: Mention armhf/aarch64 seccomp fixes. 2024-03-04 20:45:43 -05:00
David Korth
57e6542584 [libunixcommon] dll-search.c: Fix KF6 detection.
kdeinit6 doesn't exist, but we can check KDE_SESSION_VERSION instead.
This variable has been set since KDE 4.

Without this change, rp-config would always use the KF5 version on
KF6 because it couldn't find any matching kdeinit process.

TODO: Only check KDE_SESSION_VERSION instead of checking processes?

NEWS.md: Mention this.
2024-03-03 17:40:07 -05:00
David Korth
a5a6d140c1 rom-properties 2.3 2024-03-03 13:25:30 -05:00
David Korth
13a95183eb [libromdata] Intellivision: Initial Intellivision ROM image parser.
There's a bit of weirdness with Intellivision due to its unusual word
size. The General Instrument CP1610 is a 16-bit CPU, but uses 10-bit
opcodes. Because of this, Mattel used 10-bit ROMs. Some of the fields
in the ROM header use 16-bit addresses, split up into two 10-bit words.
The ROM file uses 16-bit big-endian for words, so in order to decode
these addresses, we have to take two 16-bit big-endian values, read
the low 8 bits of each, and combine it into a 16-bit value.

NOTE: ROM images must have a .int or .itv file extension, since the
Intellivision ROM header doesn't have a magic number.
2024-03-02 16:47:14 -05:00
David Korth
99aed172ac [kf5] XAttrViewPluginFactoryKF5: Fix XAttrView on KF5 older than 5.89.0.
The registerPlugin<> call incorrectly specified XAttrViewPropertiesDialogFactory
instead of XAttrViewPropertiesDialogPlugin.
2024-02-29 23:36:43 -05:00
David Korth
55e1464fc0 NEWS.md, README.md: Mention ColecoVision. 2024-02-27 19:45:17 -05:00
David Korth
d28a6ec065 NEWS.md: Mention CBMDOS G71 images. 2024-02-27 00:30:15 -05:00
David Korth
d9004f977b NEWS.md: Mention GameCube DPF and Wii RPF sparse disc images. 2024-02-26 19:13:57 -05:00
David Korth
bdf187d6e0 README.md: Update for v2.3.
New preview image: rp-v2.3-kde5.CBMDOS.png

This shows a Commodore 1541 disk image from GEOS.
2024-02-25 20:34:02 -05:00
David Korth
c36ba28c0e NEWS.md: Mention CBMDOS. 2024-02-24 21:47:14 -05:00
David Korth
9a39ccd34c NEWS.md: DirectDrawSurface supports mipmaps now, but SegaPVR still does not. 2024-02-14 22:25:23 -05:00
David Korth
69a1542a62 Add Italian gettext translations from MaRod92. 2024-02-06 19:09:50 -05:00
David Korth
9d8148a0b7 Merge branch 'bugfix/win32-dark-mode-Win11-StartIsBack' 2024-01-27 21:43:50 -05:00
David Korth
16a73d9904 NEWS.md: Mention StartAllBack fixes, with issues. 2024-01-27 21:43:28 -05:00
David Korth
39c5fc43f1 Add Romanian Win32 .rc translations from @ionuttbara. 2024-01-20 13:44:12 -05:00
David Korth
2502ed8ae1 [gtk] RomDataView: "Standard sorting" needs to be implemented manually.
On GTK3 at least, "standard sorting" is case-insensitive. This may or
may not be changed in future versions, so implement it ourselves.

sort_funcs.c: New function sort_RFT_LISTDATA_standard().
2024-01-08 19:56:12 -05:00
David Korth
6784e7a3f8 [libromdata] GameCube: "Region-Free" *is* allowed for GCN with certain debugging hardware connected.
See #400: Wrong region listed on a GameCube ISO?
2023-12-23 13:12:14 -05:00
David Korth
fafc07b637 [libromdata] GameCube: The "Region-Free" region code isn't valid for GCN; only Wii.
Fixes #400: Wrong region listed on a GameCube ISO?
Reported by @loser2023sgyt.
2023-12-23 13:09:21 -05:00
David Korth
12c4e5f7d6 [libromdata] GameCubeSave: Allow files with no icon or comment. (address == 0xFFFFFFFF)
Some SDK tools generate save files with no icon or comment. The icon
or comment addresses in this case is 0xFFFFFFFF.

Also, split the comment code into a separate function, getComment().
Based on loadFieldData()'s version, which has a union+struct to
separate the desc and file sections.

Reported by RedBees.
2023-12-14 00:26:28 -05:00
David Korth
2dd15ffc17 [svrplus] svrplus.c: Support for 32-bit ARM applications was dropped in build 25905.
See #398.
2023-12-03 19:02:10 -05:00
David Korth
4b8c3b8628 Merge branch 'feature/IDiscReader-as-IRpFile'
Conflicts:
	NEWS.md
2023-12-03 13:11:04 -05:00
David Korth
d95cafbebb [svrplus] svrplus.c: Register for arm64 and arm64ec on Win11 build 21262 or later; for earlier versions, only arm64.
ARM64EC was added at the same time as general amd64 emulation in
Windows 11 build 21277 (actually 21262, a leaked build).

On Windows 10, don't register for either amd64 or arm64ec.

See #398: Installing on ARM64 shows an error that the AMD64 version
of the DLL couldn't be registered
Reported by @kristibektashi.
2023-12-03 13:05:13 -05:00
David Korth
92393c3a20 [svrplus] svrplus.c: On ARM64 Windows 11, install for i386, arm64, and arm64ec.
On Windows 10, only install for amd64 if using build 21277 or later,
since that's when amd64 emulation was added.

Fixes #398: Installing on ARM64 shows an error that the AMD64 version of
the DLL couldn't be registered
Reported by @kristibektashi.
2023-12-03 12:27:45 -05:00
David Korth
daaf1622a6 NEWS.md: Dark Mode is fully implemented.
Update copyrights for the various components:
- ysc3839 and PolyHook_2_0 are MIT.
- TortoiseGit is GPLv2.
- Notepad++ is GPLv3.
2023-11-19 12:54:16 -05:00
David Korth
c479d74867 [libromdata] NASOSReader::isDiscSupported_static(): Fix detection of dual-layer Wii images.
These have 'WII9' magic.

I'll note that this isn't *too* relevant now that RomDataFactory checks
the magic numbers and 'WII9' is present there.
2023-11-14 22:46:06 -05:00
David Korth
aa925665b0 [libromdata] RomDataFactory: Add SparseDiscReader handling.
Instead of requiring each RomData subclass (GameCube, PSP, etc.) to
explicitly handle various sparse disc formats, have RomDataFactory
check for sparse disc images itself. That way, if one is found, the
appropriate SparseDiscReader subclass can be opened and the disc read
as if it's a flat disc image.

Among other things, this adds support for ZISO and PSP CISO formats
for PS2 loaders. It also technically allows those formats to be used
for GameCube and Wii disc images, though it doesn't make much sense.

Tested by converting a GameCube disc image to multiple formats,
including GameCube CISO, GCZ, PSP CISO, JISO, ZISO, and DAX.

Fixes #397: Could you add support for PS2 ISO's compressed to zso and cso?
Reported by @60fpshacksrock.
2023-11-14 18:43:07 -05:00
David Korth
c7fa834818 Merge branch 'feature/Win32-DarkMode'
Aside from Tab Control and RichEdit, it's basically done.

NOTE: RFT_LISTDATA should be updated for proper ListView transparency.

Conflicts:
	NEWS.md
2023-11-11 20:47:03 -05:00
David Korth
6b336833a8 NEWS.md: Mention Dark Mode on Windows.
FIXME: Tab Control and RichEdit is still a bit wonky.
2023-11-11 20:25:10 -05:00
David Korth
f944b82a4c NEWS.md: Note that the zlib-ng Windows XP issue affects rom-properties v2.2 - v2.2.1. 2023-11-09 20:19:20 -05:00
David Korth
66cd22c988 [librpbase] AesCAPI::decrypt(): Fix a memory leak when using CTR decryption.
hMyKey was never destroyed in the CTR path; only the ECB and CBC path.

Also: s/EBC/ECB/

Not too noticeable, since this would only show up if a user attempted to
view an encrypted Nintendo 3DS ROM image on Windows XP. (On Windows Vista
and later, AesCAPI_NG is used instead.)
2023-11-09 20:18:07 -05:00
David Korth
08e9ad2e12 NEWS.md: Mention the Windows XP zlib-ng fix. 2023-11-09 01:25:55 -05:00
David Korth
7b859302dc NEWS.md: Mention DXT5nm. 2023-10-30 19:06:15 -04:00
David Korth
656e265ce5 [gtk4] NautilusPropertiesModelProvider: Check for achievements when the Nautilus properties page is opened.
There's no way to wait for the user to select the "ROM Properties"
section, since NautilusPropertiesModel is an abstract model, not an
actual GtkWidget.
2023-10-14 11:32:54 -04:00
David Korth
22c6ff32be NEWS.md: Mention the GTK4 GdkTexture switch. 2023-10-14 01:54:47 -04:00
David Korth
4669eaf9d0 [libromdata] EXEData: Add 0x0601 for PowerPC (big-endian).
This CPU type is used by the old MSVC for Mac.

0x01F2, the CPU type for Xbox 360, is now "PowerPC (big-endian; Xenon)".

FIXME: Subsystem version on the test DLL is "1024.32768". Byteswapping
this results in "4.128", which is still not quite right. Import and
export tables aren't showing up either, which probably means some
fields are in big-endian that are normally in little-endian.

Fixes #396: PE machine value 0x0601 == PowerPC big-endian (classic Mac)
Reported by @Wack0.
2023-10-07 16:32:39 -04:00
David Korth
2de2f50be6 NEWS.md: Mention mipmap support for DirectDrawSurface. 2023-09-28 19:35:32 -04:00
David Korth
cc71967428 NEWS.md: Mention mipmap extraction and tests. 2023-09-24 12:00:26 -04:00
David Korth
4512f93957 [libromdata] NES: Fix PRG RAM size (non-battery-backed) for NES 2.0 ROM headers.
It was incorrectly using the battery-backed PRG RAM size for both
fields.

Also, show PRG RAM before CHR RAM for consistency with PRG ROM and
CHR ROM.

Found using ubsan:
src/libromdata/Console/NES.cpp:1079:24: runtime error:
shift exponent -1 is negative

This has been broken since NES 2.0 PRG RAM fields were added in
commit 6e9206b03e.
([libromdata] NES: Added NES 2.0 PRG RAM fields.)

Affects: v1.1 - v2.2.1

Re-generated the NES test files.
2023-09-16 22:06:01 -04:00
David Korth
94f6fa3ad3 [libromdata] MegaDrive::parseIOSupport(): Fix some incorrect shift values.
The table needs MD_IOSH_* values, but a few were using MD_IO_*:
- Team Player
- Light Gun
- Activator
- Tablet
- Paddle

Re-generated MD, 32X, and Pico test files.

NOTE: Some Pico games have 'V' (Paddle), which doesn't make sense because
the Pico doesn't have a detachable controller...

Found using ubsan in RomHeaderTest:

src/libromdata/Console/MegaDrive.cpp:307:15: runtime error:
shift exponent 52 is too large for 32-bit type 'unsigned int'

This fixes a regression from commit 7fe699aae4.
([libromdata] MegaDrive::parseIOSupport(): Use an index-based lookup table.)

Affects: v2.0 - v2.2.1
2023-09-16 21:45:46 -04:00
David Korth
511acbef1e NEWS.md: Mention SSSE3 possibly not working properly. 2023-09-15 20:15:24 -04:00
David Korth
b33c293a13 [win32] RP_XAttrView: Use LoadDialog_i18n().
This lets us adjust the xattr tab language by setting LC_ALL and/or
LC_MESSAGES instead of having to completely disable the other language
.rc files.
2023-09-09 11:40:54 -04:00
David Korth
2f4ae8f14f NEWS.md: Mention support for SegaPVR GVR CI4/CI8 textures. 2023-08-26 17:20:16 -04:00
David Korth
80e90e9cf1 NEWS.md: Mention SPC duration. 2023-08-26 14:05:28 -04:00
David Korth
edc3ea7d81 NEWS.md: Mention the GTK DragImage crash. 2023-08-20 21:27:07 -04:00
David Korth
8562b3cf8f Merge branch 'feature/replace-RefBase-with-shared_ptr'
Conflicts:
	NEWS.md
	src/libromdata/RomDataFactory.cpp
2023-08-20 17:49:09 -04:00
David Korth
c53e4e2444 NEWS.md: Mention issue #382. 2023-08-20 13:49:59 -04:00
David Korth
afa734421c [libromdata] Nintendo3DS: Add unofficial MIME types used by Citra.
This should fix issues on Linux systems where Nintendo 3DS files weren't
detected by rom-properties due to Citra registering its own MIME types.

See issue #382: Errors in KDE
This particular issue was diagnosed by @dnmodder.
2023-08-20 13:28:02 -04:00
David Korth
8b04c0a391 NEWS.md: Mention std::shared_ptr<>. 2023-08-19 23:43:21 -04:00
David Korth
d71c79bd1b [kde] ListDataModel: Fixed dragging images from ListData views to the file browser.
RpImageRole was no longer being set.

Note that Dolphin 23.04.3 has issues receiving drags when using Wayland,
but it works when using X11.

This broke in Oct 2020 when the ListData views were reworked from
QTreeWidget to QTreeView in order to implement sorting.

See these commits:

commit a97b59ab6c
([kde] Split most of the RFT_LISTDATA QListView code into a separate QAbstractListModel subclass.)

commit 4a557a8e9a
([kde] ListDataMode; Handle icons.)

Affects: v1.8 - v2.2.1
2023-08-19 12:00:28 -04:00
David Korth
a731720fdc NEWS.md: Mention XFS attributes. 2023-08-12 10:58:51 -04:00
David Korth
0d9c9d05a7 [win32] CMakeLists.txt: Restore "/dENABLE_DECRYPTION" for RCFLAGS.
This is still needed for IDD_CONFIG_KEYMANAGER in the localized
Win32 .rc files. It is *not* needed in libromdata.

As a result, the Key Manager tab wasn't showing up in the Windows build,
since the dialog resource was missing.

TODO: Move this to cmake/win32.cmake instead?

This fixes a regression from commit 0956573212.
(Don't translate the KeyManager Import menu actions.)

Affects: 2.2.1
2023-08-10 21:57:46 -04:00
David Korth
1d2af48cc6 NEWS.md: Mention MMC01/MBC1M.
Fixes #394: GameBoy multicarts: MBC1M and MMM01
Requested by @DankRank.
2023-08-08 20:13:28 -04:00
David Korth
474301389c [gtk] KeyManagerTab: Call gtk_window_present() on the GtkFileChooserDialog to make it visible.
I'm not sure when exactly this broke (possibly when it was rewritten to
use a signal handler instead of a modal event loop), but on GTK4, the
file chooser dialog no longer appeared when attempting to import a file.
(...actually, this may have been broken on GTK4 since GTK4 support was
added in v2.1, but it worked on GTK3 without gtk_window_present()...)

RomDataView_ops.cpp: Use gtk_window_present() instead of gtk_widget_show()
for the GtkFileChooserDialog, and call it on GTK4 in addition to GTK2/GTK3.
This hasn't been tested on GTK4 yet due to GTK4 Nautilus not supporting
full property pages, but I assume GtkFileChooserDialog would not have
shown up properly there, too.

TODO: Switch to GtkFileDialog on GTK 4.10 and later.
2023-08-08 18:09:22 -04:00
David Korth
7669d4b953 [win32] AchievementsTab: Use RomDataFormat's formatDateTime().
Among other things, this fixes an issue where the displayed timestamp
was in UTC instead of the local timezone. This issue appears to have
been present since AchievementsTab was first implemented on Windows.
Not sure why I didn't notice it before...

Initial commit: 2f93817740
([win32] AchievementsTab: Initial version for Windows.)

Affects: v1.8 - v2.2.1
2023-08-07 01:08:09 -04:00
David Korth
b9b2d62fac NEWS.md: rpcli *has* been updated for UTF-16 filenames on Windows. 2023-08-06 17:05:35 -04:00
David Korth
1ea1bed0e8 [libromdata] DMGSpecialCases::is_rpdb_checksum_needed_ID6(): Fix an incorrect bounds check.
We no longer have an empty string at the end of cgbSpecialCases[], so we
need to use an explicit count.

Found via clang-tidy 16.0.4:

DMGSpecialCases.cpp:260:12: warning: The left operand of '!=' is a garbage value [clang-analyzer-core.UndefinedBinaryOperatorResult]
             p[0] != '\0'; p += sizeof(cgbSpecialCases[0]))
             ~~~~ ^
DMGSpecialCases.cpp:259:2: note: Loop condition is true.  Entering loop body
        for (const char *p = &cgbSpecialCases[0][0];
        ^
DMGSpecialCases.cpp:262:7: note: Assuming the condition is false
                if (!strncmp(p, id6, 6)) {
                    ^~~~~~~~~~~~~~~~~~~
DMGSpecialCases.cpp:262:3: note: Taking false branch
                if (!strncmp(p, id6, 6)) {
                ^
DMGSpecialCases.cpp:260:12: note: The left operand of '!=' is a garbage value
             p[0] != '\0'; p += sizeof(cgbSpecialCases[0]))
             ~~~~ ^

Affects: v2.2.1 (maybe; I didn't see any crashes...)
2023-08-05 17:46:07 -04:00
David Korth
5ebee158fa NEWS.md: Mention #390. 2023-08-05 13:23:52 -04:00
David Korth
0aeb04bddd [librpfile] RpFile_win32.cpp: reOpenFile(): Convert GetLastError() to POSIX instead of just using EIO if GetFileAttributes() fails.
This improves error messages if a file cannot be found, e.g. the
Nintendo DS blowfish key file.

This bug exists since at least commit 6991e61964.
([librpbase] Improved device file recognition.)

Affects: v1.4 - v2.2.1 (and possibly earlier versions)
2023-08-05 13:16:16 -04:00
David Korth
cf23fe0e73 [win32] OptionsMenuButtonPrivate::updateOp(): Don't unconditionally set MF_DISABLED.
This appears to have been a debugging line I forgot to remove when
splitting OptionsMenuButton out of RP_ShellPropSheetExt... two years
ago! The end result is Options menu items will always be disabled
after using them once, so the properties window will need to be closed
and reopened in order to use them again.

This fixes a regression from commit d03f577cb1.
([win32] OptionsMenuButton: Split out from RP_ShellPropSheetExt.)

Affects: v1.8 - v2.2.1
2023-08-05 13:04:23 -04:00
David Korth
56c513b5e3 Merge branch 'bugfix/FreeBSD-build-fixes' 2023-08-05 01:31:17 -04:00
David Korth
f8cdd449c1 NEWS.md: Update mentions for Linux (POSIX) XAttrs. 2023-08-05 01:27:59 -04:00
David Korth
9135ed514f [libromdata] Nintendo3DS: Don't show a grayed-out "Extract SRL" if the file doesn't have one.
There's no point in keeping a grayed-out entry just because *some*
3DS CIAs can have embedded SRLs. Only show the entry for CIAs that
actually *do* have embedded SRLs.
2023-08-05 00:38:23 -04:00
David Korth
9c66cd4881 [librpfile] XAttrReader_(linux|freebsd).cpp: Fix an off-by-one that prevented a file's last attribute from being displayed.
If the new pointer position after reading the current attribute name
*equals* the ending position, then we're fine. It's only if the new
position is greater than the ending position that we have a problem.

Not sure how this worked before... (or maybe I just didn't notice that
only one xattr was showing up in rom-properties cache files; which one
is seemingly random...)
2023-08-05 00:20:26 -04:00
David Korth
6098800ffa [gtk] Add SOVERSIONs to all of the dlopen()'d library filenames.
On Ubuntu, the non-versioned symlink is only available if the -dev
packages are installed. This means that the GTK UI frontend has
potentially been broken on non-development Ubuntu systems since
at least v1.6.
2023-08-03 20:46:44 -04:00
David Korth
a83ee7a2a6 NEWS.md: Mention Win32 ListView string truncation. 2023-08-02 19:39:13 -04:00
David Korth
b5e4cf4a9d NEWS.md: Mention the Wim pull requests, too. 2023-08-01 19:42:13 -04:00
David Korth
1862f55855 NEWS.md: Mention the Wim class. 2023-08-01 19:40:49 -04:00
David Korth
c3d02a599f rom-properties 2.2.1 2023-07-31 19:04:40 -04:00
David Korth
7a8681c09a NEWS.md: Mention NES mapper updates and the fix for mapper 458's submappers. 2023-07-22 13:23:27 -04:00
David Korth
ebc93589af [win32] Don't square icons on Windows Vista and later.
Thumbnails for images that were taller than they were wide appeared
squished with squaring enabled, even though the generated image is
correct. Not sure why this is happening...

Windows XP had issues with non-square icons, but Windows 7 seems to be
handling them without any problems.

See #385: Ratio of ps2 longbox thumbnails looks wrong?
2023-07-16 22:53:07 -04:00
David Korth
4a223eadf8 [kf5,kf6] Fix metadata extraction on KF5 (and presumably KF6).
v2.2 added JSON plugin metadata to the forwarder plugins. Unfortunately,
KFileMetaData uses a completely different format than other KDE plugins,
which broke metadata extraction.

This was broken in v2.2.
2023-07-15 15:39:39 -04:00
David Korth
4617696181 [win32] Disable automatic thumbnail squaring for everything except IExtractIcon.
It seems this causes cover art for e.g. Wii U and PS2 to be squished.
I'm pretty sure it worked before, though...

The Win32 CreateThumbnail class now takes a parameter, doSquaring.
It's set to false by default, but RP_ExtractIcon sets it to true.
CreateThumbnail::rpImageToImgClass() will only square the image if
the doSquaring parameter was set to true in the constructor.

CreateThumbnailNoAlpha also has the parameter, though since this class
is only used by RP_ExtractImage, it will stay false.

Fixes #385: Ratio of ps2 longbox thumbnails looks wrong?
Reported by @Masamune3210.
2023-07-15 11:51:38 -04:00
David Korth
252002d09b [libromdata] GameCube: Set d->hasDiscHeader = true for WIA/RVZ after reading the disc header.
WIA/RVZ stores an uncompressed copy of the disc header at the beginning
of the file. We were using this just fine, but this was accidentally
broken when detection for standalone Wii update partitions containing
Incrementing Values was added.

This was broken in v2.2.

This fixes a regression from commit dd414bc544.
([libromdata] GameCube: Handle standalone Wii update partitions containing Incrementing Values.)

Fixes #389: Gamecube Property sheet is blank
Reported by @Masamune3210.
2023-07-08 19:59:21 -04:00
David Korth
bc2b7d83b8 [kde] RomDataView: Check for achievements in paintEvent(), not showEvent().
For some reason, we're getting a showEvent() when the propreties dialog is
opened in addition to when the tab is selected. paintEvent() only happens
when the tab is selected, so move achievement checking there.

Note that this doesn't happen in ConfigDialog; the update checkeer in
AboutTab only triggers when the tab is selected. It's probably a minor
implementation detail in KDE's KPropertiesDialog.
2023-07-04 15:58:15 -04:00
David Korth
05207d7bc8 [libromdata] EXEData: Add IMAGE_SUBSYSTEM_WINDOWS_BOOT_APPLICATION.
Fixes #388: PE subsystems list missing Windows Boot Application
Reported by @Wack0.
2023-07-02 16:41:40 -04:00
David Korth
5b6aea2bb9 [librpbase] RpImageLoader: Allow JPEG files in Exif containers.
This fixes loading some PS1/PS2 JPEGs from RPDB.

Fixes #386: Some ps2 games never get their boxart
Reported by @Masamune3210.
2023-07-02 16:21:26 -04:00
David Korth
f12bad7d5b rom-properties 2.2 2023-07-01 15:42:35 -04:00
David Korth
0b9e16370d [win32] OptionsTab: Update the metered/unmetered states when chkExtImgDl is toggled.
I forgot to add this when initially implementing this function.

Commit 43db21debf:
([win32] OptionsTab: Add the new metered/unmetered dropdowns.)

Affects: 2.1
2023-07-01 13:04:30 -04:00
David Korth
ba06196ba3 [gtk,kde,win32] CacheTab/CacheCleaner: Allow deletion of "version.txt".
This is used by the Update Checker.
2023-06-26 02:03:32 -04:00
David Korth
df6342fb41 NEWS.md: Mention the 'H' cartridge HW type. 2023-05-30 20:07:07 -04:00
David Korth
306a314a1e [libromdata] EXEData: Fix ordering of Alpha64 so Alpha64 binaries are detected correctly.
This array has to be sorted due to the use of std::lower_bound().

Fixes #380: Alpha64 binaries are showing up as Unknown
Reported by @XenoPanther.
2023-05-17 21:53:45 -04:00
David Korth
fd0ea651a6 NEWS.md: Clarify that the GodotSTEX changes are for changes in the *final* version of Godot 4. 2023-04-02 14:03:27 -04:00
David Korth
9f7ad5dfe9 NEWS.md, README.md: Update the RomHeaderTest list and add Covers for PS2 discs. 2023-03-13 18:43:01 -04:00
David Korth
52f2947f44 [libromdata] Bump the SOVERSION from 2 to 3.
This is needed because, among other things, a lot of functions were moved
from the LibRpBase namespace to the LibRpText namespace.
2023-02-19 13:02:55 -05:00
David Korth
dd414bc544 [libromdata] GameCube: Handle standalone Wii update partitions containing Incrementing Values.
Reported by @johnsanc314.
2023-02-19 00:57:53 -05:00
David Korth
e384f45716 [libromdata] WiiSystemMenuVersion: 4.2K is v486, not v483.
Reported by @johnsanc314.
2023-02-18 15:52:15 -05:00
David Korth
3170798b01 [libromdata] GameCube: Display the Wii update partition date if available.
The date is available in __update.inf, and can help to disambiguate
update partitions that have the same system menu version but different
IOS and/or channel WADs.

Requested by @johnsanc314.
2023-02-18 15:39:02 -05:00
David Korth
f3f96d876a NEWS.md: Mention RomHeaderTest. 2023-02-17 23:28:28 -05:00
David Korth
c718428b0b NEWS.md: Mention GodotSTEX v4 changes. 2023-02-11 12:55:52 -05:00
David Korth
fe5242ccaf NEWS.md: Mention the "Convert to PNG" icon on Windows. 2023-01-14 05:34:47 -05:00
David Korth
fcf19fa231 NEWS.md: Mention DirectDrawSurface signed texture shenanigans. 2023-01-05 01:18:41 -05:00
David Korth
6e8edf51fd NEWS.md: Mention DirectDrawSurface changes. 2023-01-05 01:16:22 -05:00
David Korth
fd8fa76b26 NEWS.md: Mention the KDE split debug path fix. 2023-01-03 18:38:27 -05:00
David Korth
2ca2ea5b9d NEWS.md: Mention the RomThumbCreator fix.
I will likely release v2.2 this weekend in a shortened release cycle due
to the KDE plugins being broken on most systems.
2023-01-03 18:36:34 -05:00
David Korth
6a5d12716b Merge branch 'feature/XAttrView'
It's mostly working, except the FreeBSD version hasn't been tested yet,
and BackupRead() isn't implemented for older versions of Windows.

Conflicts:
	NEWS.md
2023-01-01 23:03:15 -05:00
David Korth
fba8aa3bb9 [libromdata] EXE: Don't show import/export tables for .NET executables.
These only have a single import, MSCOREEE!_CorExeMain.
2023-01-01 18:40:03 -05:00
David Korth
a14c9d5e78 NEWS.md: Mention that xattr functionality doesn't work on Windows XP right now. 2022-12-30 15:31:39 -05:00
David Korth
ff5151257a NEWS.md: Mention XAttrView on Windows. 2022-12-30 15:30:54 -05:00
David Korth
49f48c11e6 NEWS.md: Mention XAttrView and KF5 5.89.0 JSON loader stuff. 2022-12-30 00:44:09 -05:00
David Korth
a6a1c98dc4 [libromdata] PlayStationDisc: Added external cover images using RPDB.
The images are mirrored from the following GitHub repositories:
* https://github.com/xlenore/psx-covers
* https://github.com/xlenore/ps2-covers

Fixes #371: PlayStation 1 and 2 covers
Rpeorted by @DankRank.

TODO: Add PlayStationDisc to rp-config.
2022-12-27 19:36:18 -05:00
David Korth
cccfed6ec0 [libromdata] WiiWAD: Add application/x-doom-wad for compatibility.
Some systems assume all .wad files are Doom WADs, which breaks support
for Wii WAD files. Let's pretend we handle Doom WADs to fix this.
2022-12-26 00:22:22 -05:00
David Korth
ad98897d6b rom-properties 2.1 2022-12-24 12:39:40 -05:00
David Korth
1c7b21e6cc NEWS.md: s/or on/and on/ 2022-12-23 18:42:56 -05:00
David Korth
bbc9d5ad8f NEWS.md: Only gtk rp-config was affected by the UTC achievement unlock time issue. 2022-12-17 19:23:56 -05:00
David Korth
5cea3ec49d NEWS.md: Mention that inode/blockdevice is needed because v2.0 removed application/octet-stream. 2022-12-17 19:23:31 -05:00
David Korth
2dcf878e33 [gtk] AchievementsTab: Show unlock times in the local timezone, not UTC. 2022-12-17 14:21:32 -05:00
David Korth
5040c42371 [xdg] mime.thumbnail.types: Allow inode/blockdevice for CDs and DVDs. 2022-12-16 19:38:52 -05:00
David Korth
744322798f NEWS.md: Mention KhronosKTX2 RG88 and swizzling. 2022-12-10 18:51:52 -05:00
David Korth
b3d0b1bd1a NEWS.md: Remove "currently implemented" for "Convert to PNG".
It's implemented on Windows now.
2022-12-10 03:26:56 -05:00
David Korth
6651ccc9f0 NEWS.md: Mention service menus on KF5 and GTK2/3/4. 2022-12-09 22:45:45 -05:00
David Korth
d86a068ab0 NEWS.md: Mention thumbnailing changes. 2022-12-04 13:47:30 -05:00
David Korth
0101921e67 NEWS.md: Mention metered connections. 2022-12-04 13:19:25 -05:00
David Korth
8af3c750b0 [xdg] rom-properties.xml: Add magic strings for amiibo files.
This allows for proper thumbnailing on Linux when using the default
.bin file extension.

Fixes #370: Amiibos without thumbnails (Gnome)
Reported by @Amnesia1000.

Also change the default icon from "application-x-executable" to
"application-octet-stream".
2022-10-24 23:17:52 -04:00
David Korth
9a88336d14 NEWS.md: Mention the update checker. 2022-10-23 14:33:22 -04:00
David Korth
b40c630036 [gtk] ConfigDialog: Fix saving if the files don't exist initially.
g_key_file_load_from_file() will fail if the files don't exist.

Check the GError, and if it's G_FILE_ERROR_NOENT, continue saving
anyway.

This also fixes the Apply and Reset buttons not being disabled after
applying changes, since it never got to that part due to the error.

TODO: Show error messages?

Fixes #368: rp-config does not save configuration and keys in Manjaro Gnome.
Reported by @Amnesia1000.
2022-10-21 18:46:07 -04:00
David Korth
dc3b04abb6 NEWS.md: Mention Latin-1 issues. 2022-10-19 22:04:55 -04:00
David Korth
d514f63a1e [xdg] CMakeLists.txt: Fix installation of rp-config.desktop.
Need to use RENAME to rename the file, not INSTALL. Using INSTALL ends up
creating a subdirectory instead of renaming the file.

Fixes #367: "rp-config.desktop" file error
Reported by @Amnesia1000.
2022-10-19 20:44:08 -04:00
David Korth
e3fb6a5e4b NEWS.md: Mention Nautilus 43 (GTK4). 2022-10-01 21:35:48 -04:00
David Korth
705b5ff529 NEWS.md: Mention the ELF "TLS" symbol type fix. 2022-09-25 17:04:30 -04:00
David Korth
22e7be41a1 NEWS.md: Mention the zlib-ng WinXP AVX2 fix. 2022-09-25 17:02:45 -04:00
David Korth
78867a4bb6 [librpfile] MemFile, VectorFile: Don't use non-pointer C++ objects in the class definition.
MSVC complains now because these classes are dllexport in order to fix
a build issue with RpPngFormatTest on Ubuntu 18.04:

src\librpfile/MemFile.hpp(150,15): warning C4251: 'LibRpFile::MemFile::m_filename':
	class 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>'
	needs to have dll-interface to be used by clients of class 'LibRpFile::MemFile'
src\librpfile\VectorFile.hpp(136,24): warning C4251: 'LibRpFile::VectorFile::m_vector':
	class 'std::vector<uint8_t,std::allocator<uint8_t>>' needs to have dll-interface
	to be used by clients of class 'LibRpFile::VectorFile'

For MemFile, use a char* instead of std::string. This has a nice side
effect of reducing memory usage a bit.

For VectorFile, allocate the vector using new. This might have slight
additional overhead, since there's another pointer dereference.
VectorFile is currently only used by gtk/DragImage.cpp, so it isn't
a significant issue.

Note that since these fields are used by inline functions, changing them
*does* break the ABI, even though none of the symbols have changed, so the
libromdata SOVERSION was bumped to 2.

For rom-properties 2.0, only the Ubuntu 18.04 and later builds had the
prior changes to export MemFile, IRpFile, and RefBase, so the Windows
version didn't have that change and thus didn't need this ABI-breaking
change.
2022-09-24 23:27:07 -04:00
David Korth
5625070726 rom-properties 2.0: Stella Edition 2022-09-24 17:13:03 -04:00
David Korth
5de008b83c NEWS.md: Mention the removal of application/octet-stream. 2022-09-24 16:38:34 -04:00
David Korth
2a523c98e2 [libromdata] PlayStationDisc: Fix detection of 2352/2448-byte images.
We're reading a 2352-byte sector, so we have to compare the read size
against the sector size, not the size of d->pvd (2048).

This fixes a regression from commit 5eeeeb5bd1.
([libromdata] ISO, PlayStationDisc: Added support for 2448-byte sector file formats.)

This broke in v1.8.

Fixes #354: PS2 BIN/CUE CD Mode 2 images aren't detected
Reported by @DankRank.
2022-09-24 14:26:13 -04:00
David Korth
4a6927fb79 NEWS.md: Mention PR #358: More columns in ELF symbol tables
Submitted by @DankRank.
2022-09-24 13:49:31 -04:00
David Korth
84dd0e5277 NEWS.md: Mention ELF shared libraries and symbols. 2022-09-23 22:34:36 -04:00
David Korth
d1b77827df NEWS.md: +"and" 2022-09-23 19:25:07 -04:00
David Korth
8cde87956e NEWS.md: Updated for NE imports. 2022-09-22 19:53:44 -04:00
David Korth
49ed58e653 NEWS.md: Add bullet points to reported by/submitted by lines. 2022-09-19 19:31:19 -04:00
David Korth
1f66b6773f NEWS.md: Mention issue #355. 2022-09-19 19:30:14 -04:00
David Korth
91446c4e34 NEWS.md: Mention NE exports. 2022-09-18 21:33:01 -04:00
David Korth
9f2ab7d7d4 [libromdata] EXE_NE: Fix a segmentation fault when viewing 16-bit EXEs compiled using Visual Basic.
This broke in v1.9.

This fixes a regression from commit 650404ba93.
([libromdata] EXEPrivate::findNERuntimeDLL(): Use a table for VB runtime DLLs.)
2022-09-12 22:47:16 -04:00
David Korth
10ec09a77f [libromdata] GameCubeSave: Trim trailing CRs.
TMNT Mutant Melee [GE5EA4] has CRs at the end of the filename and
description fields. I'm not sure if it's actually included as part
of the filename on the memory card, but it looks ugly here, so
remove the CR.

NOTE: rpcli was showing it as '␍', but UI frontends were sometimes
handling it as a linebreak.

TODO: Maybe make the UI frontends show it as '␍' and don't trim it?
2022-09-11 15:30:41 -04:00
David Korth
56ec3d9c61 NEWS.md: Mention rpcli's new '-d' option. 2022-09-10 16:12:54 -04:00
David Korth
47e6f6b5e8 NEWS.md: Mention #353. 2022-08-28 18:49:11 -04:00
David Korth
4244d8be5e [win32] RP_ExtractIcon_Fallback.cpp: phiconSmall (and phiconLarge) can be nullptr.
A crash was reported when using Ghidra with rom-properties installed.
It turns out that AWT's Windows icon extraction function calls
IExtractIconW::Extract() with phiconSmall == nullptr, which *is*
valid as per MSDN documentation, but we didn't handle this properly.

Handle the case by checking for nullptr arguments, and if found, don't
attempt to write to phiconSmall (or phiconLarge). In addition, delete
the icon that would have been returned if the parameter wasn't nullptr.

Ghidra stacktrace: (Adoptium JDK 17.0.4.1) [rom-properties 1.9 release build]

Stack: [0x0000006e80600000,0x0000006e80700000],  sp=0x0000006e806fe5c0,  free space=1017k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C  [rom-properties.dll+0x7617]

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
J 13468  sun.awt.shell.Win32ShellFolder2.extractIcon(JJIZ)J java.desktop@17.0.4.1 (0 bytes) @ 0x000001796011f86e [0x000001796011f820+0x000000000000004e]
j  sun.awt.shell.Win32ShellFolder2.lambda$getIcon$0(I)Ljava/awt/Image;+148 java.desktop@17.0.4.1
j  sun.awt.shell.Win32ShellFolder2$$Lambda$834+0x00000007c0c7b170.call()Ljava/lang/Object;+8 java.desktop@17.0.4.1
J 13324 c1 sun.awt.shell.Win32ShellFolderManager2$ComInvoker.invoke(Ljava/util/concurrent/Callable;)Ljava/lang/Object; java.desktop@17.0.4.1 (108 bytes) @ 0x000001795854e7fc [0x000001795854dca0+0x0000000000000b5c]
J 13368 c1 sun.awt.shell.ShellFolder.invoke(Ljava/util/concurrent/Callable;Ljava/lang/Class;)Ljava/lang/Object; java.desktop@17.0.4.1 (70 bytes) @ 0x0000017958dcb1cc [0x0000017958dcb160+0x000000000000006c]
J 13438 c1 sun.awt.shell.ShellFolder.invoke(Ljava/util/concurrent/Callable;)Ljava/lang/Object; java.desktop@17.0.4.1 (11 bytes) @ 0x000001795968bc9c [0x000001795968bc40+0x000000000000005c]
j  sun.awt.shell.Win32ShellFolder2.getIcon(II)Ljava/awt/Image;+13 java.desktop@17.0.4.1
j  sun.awt.shell.Win32ShellFolder2$15.call()Ljava/awt/Image;+470 java.desktop@17.0.4.1
j  sun.awt.shell.Win32ShellFolder2$15.call()Ljava/lang/Object;+1 java.desktop@17.0.4.1
J 13362 c1 java.util.concurrent.FutureTask.run()V java.base@17.0.4.1 (123 bytes) @ 0x000001795990c224 [0x000001795990ba40+0x00000000000007e4]
j  java.util.concurrent.ThreadPoolExecutor.runWorker(Ljava/util/concurrent/ThreadPoolExecutor$Worker;)V+92 java.base@17.0.4.1
j  java.util.concurrent.ThreadPoolExecutor$Worker.run()V+5 java.base@17.0.4.1
j  sun.awt.shell.Win32ShellFolderManager2$ComInvoker$1.run()V+7 java.desktop@17.0.4.1
j  java.lang.Thread.run()V+11 java.base@17.0.4.1
v  ~StubRoutines::call_stub

siginfo: EXCEPTION_ACCESS_VIOLATION (0xc0000005), writing address 0x0000000000000000

Fixes #352: Ghidra crashes when rom-properties is installed on Windows
Reported by @RibShark.
2022-08-27 23:13:29 -04:00
David Korth
08cf89305e [librpfile] RpFile_stdio.cpp: Check the file type before fopen().
fopen() will hang if it's a pipe or socket with no data available, since
fopen() doesn't pass O_NONBLOCK.

Fixes #351: Dolphin hangs when accessing a directory containing a FIFO
Reported by @IntriguingTiles.
2022-08-26 00:49:55 -04:00
David Korth
6436c02c9d NEWS.md: COM/NE should be in new parser features, not new parsers.
SOVERSION: Not sure what "(-1, .1)" is for...
2022-08-13 15:34:20 -04:00
David Korth
26be0b7d6d NEWS.md: Mention the issue and PR numbers for PE exports/imports. 2022-08-13 14:58:28 -04:00
David Korth
43e9662b21 NEWS.md: Mention DLL exports and imports for PE. 2022-08-13 14:55:50 -04:00
David Korth
99abace4a5 NEWS.md: Mention improved startup notifications. 2022-07-30 13:45:49 -04:00
David Korth
61d96de56c [librptexture] XboxXPR: Handle XPRs with non-power-of-two sizes.
Forza Motorsport (2005) has a few textures that have non-power-of-two
sizes. These textures use a different encoding for width/height, in
which the normal shift values are both 0. Handle this so these XPRs
can be decoded properly.

This was reported by Trash_Bandatcoot.
2022-07-27 23:28:46 -04:00