1
0
Fork 0
Commit graph

4998 commits

Author SHA1 Message Date
krcroft
5b8364148a Use prefix form of incrementing iterators 2020-03-20 01:06:23 +01:00
krcroft
c2fcc273da Explicitly ignore some return values 2020-03-20 01:06:23 +01:00
krcroft
269908cad0 Prevent undefined behavior while bit-shifting on 32bit systems 2020-03-20 01:06:23 +01:00
krcroft
b0d90db24a Simplify joystick type assignment logic 2020-03-20 01:06:23 +01:00
krcroft
81efce0862 Refactor and make the joystick querier re-runnable
The previous function could only be effectively run one because
it changes the value of the global 'joytype' to something other
than AUTO, which is what this function looks for to re-query
the joysticks.

Second, if this function is run more than once, then it clobbers
the prior set number of joysticks back to zero (without
re-requerying for the actual quantity), rendering the joysticks
unuseable.

Finally, this function depends on several SDL calls to the joystick
subsystem, but fails to check or initialize it.

The commit:
 - Checks for an initializes the joystick subsystem before using it
 - Always re-queries the current state of the joystick (re-runnable)
 - Simplifies the logic to determine useability (retains criteria)
 - Conservatively writes the joysticks quantities at the end
2020-03-20 01:06:23 +01:00
krcroft
d815c52965 Move member initialization to the definition 2020-03-20 01:06:23 +01:00
krcroft
6c52c06a53 Cleanup leaks 2020-03-20 01:06:23 +01:00
krcroft
1460f90720 Allow finer grain tracing for debug builds 2020-03-20 01:06:23 +01:00
Patryk Obara
08de77d475 Update allowed warnings limits 2020-03-19 01:01:23 +01:00
Patryk Obara
2b6e4527be Initialize srcval on all codepaths in xga
Multiple code-paths were using this value uninitialized.
2020-03-19 01:01:23 +01:00
Patryk Obara
ffb9d62ade Change GetMixResult mixmode to uint32_t
There's no reason to use more than 32 bit for this parameter.

Also, limit scope of certain variables as much as possible without
bigger refactorizations.
2020-03-19 01:01:23 +01:00
Patryk Obara
6fe434571c Change DrawWaitSub mixmode to uint32_t
There's no reason to use more than 32 bit for this parameter; source
values are 16 bit, and they occassionally shifted, but always to values
fitting in 32 bit.
2020-03-19 01:01:23 +01:00
Patryk Obara
865ad54a87 Make XGA_DrawWaitSub a static function 2020-03-19 01:01:23 +01:00
Patryk Obara
e25e15ac1d Make XGA_GetMixResult a static function 2020-03-19 01:01:23 +01:00
krcroft
01f5ca4365 Handle user-defined sets of files 2020-03-15 21:46:46 +01:00
krcroft
6fcc453d50 Add a script to check if <ctype> is included before <algorithm> 2020-03-14 17:01:43 +01:00
krcroft
5071f76ccb Add a script to capture preprocessor #define statements 2020-03-14 17:01:43 +01:00
Wouter Wijsman
ce516d4bb0 Added Emulator category to desktop file 2020-03-14 16:50:45 +01:00
Wouter Wijsman
ac6944c7a6 Updated desktop file 2020-03-14 16:50:45 +01:00
Wouter Wijsman
9d0cc24934 Add desktop file for Linux 2020-03-14 16:50:45 +01:00
Patryk Obara
a956f14de1 Inject newlines before displaying DOS prompt
In an earlier change, I removed appending newline outside of batch mode
in DOS shell code - that made DOSBox behave less like MS-DOS and more
like modern shells, that do not try to compensate for buggy
applications.

However, we should recognize that DOSBox (unlike e.g. FreeDOS) is designed
to run legacy applications, which might make assumptions about DOS
implementation. Some examples:

- PC Player Benchmark assumes, that help commands are displayed exactly
  at 80x25 terminal and formats the output to fill the whole screen
  (scrolling past DOS4GW messages).
- Quake and other ID games print shareware information on exit, but do
  it via a direct memory dump (not interrupts to print DOS text), and
  follow up with setting cursor exactly at line 22 (which is partly
  written already), expecting shell to inject newline.
- PCC Compiler prints status message on exit without newline, depending
  on MS-DOS shell behaviour.
- TEXTUTIL set of external commands do not print nothing to standard
  output, and are designed to clear the screen, therefore writing a
  newline after .COM commands would be a mistake.

Therefore we want to inject this newline, but not in every case.

New implementation reuses a static variable used by Program base class
(for purpose of translating UNIX newlines to DOS newlines) for detection
if it's appropriate to inject an additional newline or not.

Injecting the newline happens in function displaying the DOS prompt (so
we don't need to write additonal logic for separately handling batch
mode). When starting a non-COM, non-internal command the static variable
is set to the state indicating that next DOS prompt should inject the
newline.

Fixes: #208
2020-03-12 20:54:33 +01:00
Patryk Obara
d125b61f66 Merge branch 'svn/trunk' r4335
Both new SVN commits are irrelevant to dosbox-staging:

- overlay output does not exist any more since SDL2
- we already switched to OpenGL on all OSes, not only macOS

Changes were removed during conflict resolution. Keeping empty merge
commit to aid in future imports.
2020-03-12 06:52:29 +01:00
Peter Veenstra
11c380aaba 0.74-3:mac os x default output change also in trunk now
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4335
2020-03-11 19:54:24 +00:00
Patryk Obara
07f38c8ee3
Update feature comparison in README.md 2020-03-11 11:56:10 +01:00
Patryk Obara
4e1dcfafb1 Disable unnecessary sanitizers
Clang memory sanitizer needs all linked libraries (including STL) to be
compiled with msan option, otherwise analysis results are practically
unusable.

GCC undefined behaviour sanitizer analysis is already covered by build
running UASAN (undefined behaviour and address sanitizers).
2020-03-11 10:38:10 +01:00
Patryk Obara
761f1d977a Move sanitizer selection to matrix 2020-03-11 10:38:10 +01:00
Patryk Obara
3741e7838c Set sanitizer issue limits 2020-03-11 10:38:10 +01:00
Patryk Obara
5d9ad55d8c Run sanitizer counter on available logs 2020-03-11 10:38:10 +01:00
Patryk Obara
38e2944eae Implement counter for sanitizer issues 2020-03-11 10:38:10 +01:00
Patryk Obara
60198816f1 Rename count-bugs to count-clang-bugs 2020-03-11 10:38:10 +01:00
Patryk Obara
f45e04dbb0
Fix README links to macOS release jobs 2020-03-10 10:25:51 +01:00
krcroft
abe95c195c Prevent env:OPUSFILE_LIBS from enabling Opus
In the current code, we assess the --disable-opus-cdda argument,
and if it's not present we run pkg-config to get the Opus CFLAGS
and LIBS.  If it finds them, it sets the OPUSFILE_CFLAGS and
OPUSFILE_LIBS variables.  We finally check for the presense of
one of these before actually enabling Opus.

However, if the user directly sets OPUSFILE_LIBS, then this final
check will become true regardless if the user passed --disable-opus-cdda
to configure.

The obvious fix is to move the final Opus check inside the
prior checks (for example, moving AM_CONDITIONAL(USE_OPUS) inside
AS_IF(..), however that results in the OPUS_USE conditional not
existing if the AS_IF test fails its check.

Therefore, we set a new variable HAVE_OPUS, if the pkg-config
check passes, and look for that instead of OPUSFILE_LIBS.
(Of course, the user could export HAVE_OPUS=yes in their
environment as well, but at that point they're deliberately
circumenting configure, in which case they can have at it!).
2020-03-10 06:41:02 +01:00
Patryk Obara
a67a52164e Temporarily disable stripping for CI MSYS2 cache 2020-03-09 21:28:44 +01:00
Anton Shepelev
d1be65b105 Add output type texturepp for pixel-perfect scaling
The new output type `texturepp' was added, which implements
pixel-perfect scaling using SDL's hardware-accelerated texture output.
In pixel-pefect mode, each original pixel is displayed as a rectangle m
by n pixels, so that m:n yields a reasonably good approximation of the
pixel aspect ratio (PAR) of the emulated graphical mode while using as
much screen space as possible. The balance between the precision of
aspect ratio and the utilisation of screen space is specified as the
`parweight' parameter to pp_getscale() and is currently hard-coded in
sdlmain.cpp.

This implementation emulatates pixel-perfect mode as a special case of
nearest-neighbor interpolation when the horisontal and vertical scaling
factors are integers.
2020-03-09 20:12:36 +01:00
krcroft
83f625178a Ensure the first seek isn't cached 2020-03-08 08:36:21 +01:00
Patryk Obara
6e2b794bd0 Specify -march=nehalem for macOS snapshot builds
Our macOS release builds are limited to Catalina only, and this OS
officially works only on Ivy Bridge (2012) or newer microarchitecture.
Point GCC to target Nehalen (2008) instead - this should cover also all
possible Hackintoshes or virtual machines.
2020-03-08 03:28:37 +01:00
Patryk Obara
a8c6f4f0e0 Update note about snapshot builds downloads 2020-03-08 03:28:37 +01:00
Patryk Obara
b98cd0f612 Build opusfile libs for macOS snapshots
This is a temporary measure until our buildsystem will be capable of
correctly picking static libraries directly from the OS.
2020-03-08 03:28:37 +01:00
Patryk Obara
3c44ad29b8 Document link to macOS snapshot builds in README 2020-03-08 03:28:37 +01:00
Patryk Obara
7e2124c544 Link to master builds only from README file 2020-03-08 03:28:37 +01:00
Patryk Obara
e0623b75c2 Add an option for static linking of SDL2 2020-03-08 03:28:37 +01:00
Patryk Obara
c6846de500 Use AS_HELP_STRING macro for optional autoconf parameters 2020-03-08 03:28:37 +01:00
Patryk Obara
1bb60bc5c7 Add a script for creating macOS app bundle 2020-03-08 03:28:37 +01:00
Patryk Obara
69fea29f1e Add macOS release CI job
The builds have all optional features turned off to avoid dealing with
static linking of additional libraries.
2020-03-08 03:28:37 +01:00
Patryk Obara
a5ade1ba5c Add an option for disabling networking features
Pass --disable-network to disable modem and ipx features during
configuration step (and avoid linking SDL2_net without actually removing
it from the system).
2020-03-08 03:28:37 +01:00
krcroft
bcae097e22 Refresh copyrights and headers 2020-03-07 11:07:48 +01:00
krcroft
37a1610f1c Bump the MP3 fast-seek-table's version identifier
The hashest generated by xxHash have changed between v0.7.2 and v0.7.3,
therefore the hashes in prior-genreated lookup tables will no longer
be valid. By bumping the file's identifier, the fast-seek code will
reject these older files and regenerate new ones.
2020-03-07 01:46:55 +01:00
krcroft
27538eeb2e Update the existing PVS false-positives for xxHash v0.7.3 2020-03-07 01:46:55 +01:00
Yann Collet
355b6faba7 Sync xxHash with upstream (v0.7.3) 2020-03-07 01:46:55 +01:00
Joshua Fern
f2029d71d8 Update copyright dates to 2020 2020-03-07 00:18:01 +01:00