1
0
Fork 0
Commit graph

5015 commits

Author SHA1 Message Date
Patryk Obara
0b173eec08 Cleanup and document GFX_StartUpdate function
Usage of this function depends on the state of global sdl struct; and
it's very easy to make a mistake - documentation should lower this risk.

Change the type of output parameter 'pitch' and assure type safety with
internal SDL types via static asserts.
2020-03-27 00:54:11 +01:00
Patryk Obara
08934b2972 Remove dead code remains of WinDIB usage
This used to have meaning for Windows 9x support via SDL 1.2; the issue
described in README was never mentioned in the context of SDL2.

Add missing include to video header while we're at it.
2020-03-27 00:54:11 +01:00
krcroft
2fc6771046 Use ISO date format for ccache keys 2020-03-25 16:20:13 +01:00
krcroft
2c8db8fbe4 Use ccache in the CI workflows 2020-03-24 03:42:04 +01:00
Patryk Obara
7957396d32 Turn on CI jobs for pull_request event
This will trigger CI jobs automatically when pull-request is
created/updated. Until now we used only push event, as it was enough to
handle all automatic jobs from repository maintainers, but this does not
work for pull requests triggered by external collaborators.

We can't simply turn on new event, as it results in duplicate jobs when
PR is created by maintainer, so additional "if" filter is needed to
prevent duplicates from running. GitHub still shows "empty jobs" in some
parts of UI, but at least they don't run and fight for resources.

Unfortunately, GitHub Actions "if" functionality is fairly limited at
the moment:

- it does not work on workflows, only specific jobs
- it does not support array literals (that's why maintainer list is
  passed as a string)
- it can't access workflow env variables (that's why maintainer list is
  duplicated)
- it does not support regular expressions
- seems to have problem with using unary "!" operator and nested boolean
  expressions…
- … and official documentation is pretty misleading by suggesting it
  can do many of those things :(

that's why this "if" line looks like it does and is duplicated in every
workflow.
2020-03-24 01:48:45 +01:00
NicknineTheEagle
383c7e2e96 Describe phonebook feature in the manual 2020-03-23 01:15:28 +01:00
NicknineTheEagle
e905a6bd5d Implement phone book to remap phone numbers to addresses for modem 2020-03-23 01:05:03 +01:00
NicknineTheEagle
de45c413ae Fix auto-answer (S0) behavior in modem 2020-03-23 01:02:42 +01:00
NicknineTheEagle
880d2d2ceb Implement DTR drop actions (&Dn) and DTR drop delay (S25) in modem
&D0 may be needed for old apps which don't set DTR or set it to garbage.
DTR drop delay is required for Quake otherwise it doesn't disconnect
properly.
2020-03-23 01:02:42 +01:00
NicknineTheEagle
9cb13f6158 Fix a bug with backspace handling in modem
Fixes a bug where entering backspace while command buffer was already
empty added backspace char to the buffer thus screwing it up.
2020-03-23 01:02:37 +01:00
krcroft
99a47bc590 Use ccache if available 2020-03-22 21:12:36 +01:00
krcroft
f1b9e5046d Update allowed warnings limits 2020-03-21 23:41:06 +01:00
krcroft
99e53a830f Track and free unassigned CStickBindGroup allocations 2020-03-21 23:41:06 +01:00
krcroft
a1a3e0203d Only initialize the mapper once during startup 2020-03-21 23:41:06 +01:00
krcroft
fba15b997e Add Code of Conduct
Signed-off-by: Patryk Obara <dreamer.tan@gmail.com>
Signed-off-by: krcroft <krcroft@users.noreply.github.com>
2020-03-21 23:38:49 +01:00
krcroft
f142509ac8 Selectively enable MarkDown line-length checking 2020-03-21 23:38:40 +01:00
krcroft
694e6f6cb1 Update allowed warnings limits 2020-03-20 01:06:23 +01:00
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