Commit Graph

13 Commits

Author SHA1 Message Date
Nick Westgate 690b5d0bfc WIP
Still testing
2020-07-25 12:17:39 +10:00
tomcw 0f473d44b6 VS2019: include <stdexcept> for std::runtime_error 2020-01-06 21:08:00 +00:00
Brett Vickers 9e5e21b8c9 Prevent uninitialized value bugs and improve string safety.
This change does two things:

1. Updates the registry APIs to reduce the likelihood of uninitialized
variables.

The code wasn't always checking the return value of registry load operations.
In some cases, this led to uninitialized memory being used, and crashes could
result. For example, LoadConfiguration in Applewin.cpp was using an
uninitialized value for the computer type if no registry variable for the
"Apple 2 type" was set.

New registry reading methods and macros have also been introduced, allowing
default value fallbacks for the cases where a registry variable is not found.
This makes registry access simpler and safer when a default value is known in
advance.

The registry code's style has also been updated to conform with the rest of
the code base (tabs instead of spaces, naming conventions, etc.)

2. Introduces string safety improvements.

A number of code paths have been modified to use safe-string functions instead
of their unsafe counterparts (e.g., strcpy, sprintf).  In the process, some
strings were converted from "char" to "TCHAR". This was done mostly for
consistency with the rest of the code-base.
2019-08-09 13:38:50 -07:00
tomcw fdd6a622dc Simplified AKD support 2018-06-02 22:26:29 +01:00
Kelvin Lee b02c7ffb10 Added VS2017 support. 2017-06-10 20:39:25 +01:00
tomcw 66e468db65 Merged in Nick's new native resolution full-screen
- old 640x480 full-screen deprecated

Fixes for:
. Logo & Debug window scaled/positioned correctly
. Buttons & disk activity (on RHS) drawn in correct position
. Crosshairs for mouse (and when using mouse as joystick)drawn in correct position
2016-07-12 22:43:31 +01:00
tomcw e98de27039 Manual merge from master @ c798157 2016-03-21 23:48:02 +00:00
tomcw e03b90fbe8 Support VS2008 2016-03-21 22:27:09 +00:00
michaelangel007 e116014742 First pass of NTSC integration 2014-12-31 14:13:36 -08:00
tomcw e3508c29aa Fix for window border when building with VS2012 & VS2013, using GetSystemMetrics(SM_CXPADDINGBORDER) 2014-08-20 22:40:48 +01:00
tomcw cbdad2a02f Qualified all STL refs with std:: to get rid of the 'using namespace std' mismatch between the main code & debugger code 2014-08-14 20:29:01 +01:00
tomcw 6a26a95487 PCH refactor: remove non-system headers from stdafx.h 2014-08-13 21:30:35 +01:00
tomcw d591dd006b Remove the top-level AppleWin folder 2014-05-23 22:59:02 +01:00