We previously rolled our own text <-> int conversion code for
the dialogs. Use winapi's built-in one instead.
While we're at it, fix some indentation and a return-code.
If an error happens while loading, the old document should be left
intact. Ensure this by not modifying the document until all loading
code has been run.
Proper Amiga-suport is supplied by using the AmiTCP stack when
USE_AMITCP is enabled. Add explicit OpenLibrary/CloseLibrary
calls, for those people who don't link against auto-opening
libs ala VBCC's auto.s.
Add a typedef for uint32_t (needed for network communication)
for Motorola 68k platforms.
Also add a SAS/C support for the 'inline' keyword.
Thanks to Aske Simon Christensen for help with the SAS/C support.
The current layout of the compatibility checks makes is a bit
tricky to reuse parts of a platforms quirk-arounds when adding
compiler-support.
Reorganize into three sections:
- inline support
- CRT features
- socket-stack
While we're at it, make sure we always delete all the data before
trying to re-request. This we won't get out of sync on socket-error
at that particular location.
Previously some functions returned 1 and some returned -1 on
error. There were also two internal functions that returned 0
on error and 1 on 0 on success. Fix this, and make sure we
always return -1 on error and 0 on success.
There were a couple of places where malloc-failures (out-of-memory,
really) weren't caught. This isn't a big deal on modern operating
systems, but is worth dealing with on low-end platforms.
Failures to add/delete keys should count as socket-errors, because
they cause the editor and client to become out of sync.
When seeking in MP3s, BASS needs the BASS_STREAM_PRESCAN-flag to enable
accurate seeking.
While our example uses OGG Vorbis instead of MP3, it doesn't hurt to set
the flag, and leaves one less bug-source for people who base their code
of the example.
Previously, sync_track_path could either overflow it's 'temp'
buffer by one byte, or (even worse) end up not zero-terminating
it.
Correct the code by explicitly zero-terminating the result of
strncpy, and reducing the lenght-parameter to strncat.
Unify the interface for load_track_data() and request_track_data(),
as they essentially perform the same task, but for different
compile-time configurations.
sync_update is the only code-path that can end up calling any of the
callbacks, so there's no need to store it in the device.
This is a breaking change, so all users needs to update their code
accordingly.
BASS and SDL both add a set of headers and libs that needs
to be included into the project. Allow the user to put these
headers in a subfolder called "include" and the libs in a
subfolder called "lib".
Since BASS is available for MacOS X and Linux as well as Windows,
it makes sense to port the example to OpenGL rather than Direct3D9.
Use SDL to get an OpenGL context in a portable fashion.
Remove newlines to reduce noise from visual studio when updating
the resources.
Fix _APS_NEXT_RESOURCE_VALUE so 104 won't be generated, it already
exist.
afxres.h is MFC-ism, and is not included in Visual Studio Express 2008.
To avoid confusing the resource editor in other visual studio versions,
let's implement a minimal version ourselves.
With some really bad luck, it was possible to crash inside
std::string::resize() if the connection was disconnected
right after sending the GET_TRACK command.
C89 does not define strdup(), so provide an implementation for
the systems that doesn't implement it. Enable it by adding
"CPPFLAG += -DNEED_STRDUP" to config.mak.