62 Commits

Author SHA1 Message Date
Jonathan Campbell
dc8bf28f65 more 2018-02-18 02:23:09 -08:00
Jonathan Campbell
dd1802cb7b more 2018-02-18 02:17:58 -08:00
Jonathan Campbell
697210e9b7 Recent versions of Darwin do not support the color palette 2018-02-16 19:28:26 -08:00
Jonathan Campbell
cc6adf17cf Dont use X11 on Darwin 2018-02-16 19:27:56 -08:00
Jonathan Campbell
0f11e2c42f Seriously, SDL 1.x, build yourself properly and stop deleting the stock SDL_config.h on Linux. Windows builds need the stock header. Knock it off, okay? 2018-02-16 15:16:06 -08:00
Jonathan Campbell
f2b1fe8444 Try to fix SDL1 on Linux not to recompile itself again and fail 2018-02-16 14:52:24 -08:00
Jonathan Campbell
51eb90db66 WM_DROPFILES is broken, remove handling. Keep function. I don't think the drop handle is valid after SDL's message pump has handled it. 2018-02-06 08:45:40 -08:00
Jonathan Campbell
45f76cab00 Windows SDL 1.x: Modify window proc to queue SDLWMSYSEVENT events only for specific Win32 messages that are relevant to DOSBox-X. I suspect user complaints about non-functional menu bar commands may be caused by too much Win32 message chatter in Windows since SDL only has so much queue to hold it. 2018-02-06 08:38:14 -08:00
Jonathan Campbell
1a2ec91e34 Windows SDL 1.x: Minimizing the window can screw up 3Dfx OpenGL emulation. Remove minimize button from Windows style if 3Dfx OpenGL emulation is active. 2018-02-05 14:45:24 -08:00
Jonathan Campbell
22d2b24a6a Linux/X11: SDL video mode changes, which involve destroying and recreating the SDL_Window, dont need to involve hiding and showing the WMwindow parent. Map WMwindow once and never unmap until SDL video shutdown. This fixes problems with XFCE moving the window to the upper left hand corner of the screen everytime SDL X11 recreates the window (such as going from OpenGL to non-OpenGL video mode). 2018-02-04 08:37:59 -08:00
Jonathan Campbell
fb1745720a Linux/X11: Comparing Visual pointers will always detect change. Compare the actual Visual members to detect change. That way were not constantly recreating the window 2018-02-04 02:01:33 -08:00
Jonathan Campbell
527afc694b Linux/X11: Match visuals by ID not pointer. Pointers can change per invocation. Try to avoid recreating the X11 window unless the visual actually changes. 2018-02-04 01:44:38 -08:00
Jonathan Campbell
6830f5e0be Windows SDL 1.x: On losing focus from fullscreen (ALT+TAB, etc) restore the window instead of minimzing it. 2018-02-03 19:56:33 -08:00
Jonathan Campbell
5f49960bdb Linux/X11: Use XSync during shared memory pixmap setup but dont throw away X11 events doing so (hail-to-the-ryzen) 2018-02-03 19:05:33 -08:00
Jonathan Campbell
8cde7e3755 Linux/X11: output=opengl reset as much OpenGL state as needed to ensure that the DOS console remains visible even after 3Dfx OpenGL emulation. Add more XSync/glFlush to keep MesaGL in line. It turns out the blank screen after 3Dfx OpenGL emulation was a change in the OpenGL texture modulation function, and blending 2018-02-03 18:07:20 -08:00
Jonathan Campbell
a7dcade7b1 Linux/X11: MesaGL is apparently asynchronous enough to require glFlush and XSync before glXMakeCurrent and then before glXDestroyContext. This fixes the BadDrawable X11 error when shutting down and destroying the SDL window after 3Dfx opengl mode. 2018-02-03 17:12:44 -08:00
Jonathan Campbell
77d5e3d317 Linux/X11 SDL 1.x: Im tracking down why 3Dfx OpenGL emulation causes problems with SDL 1.x such as X11 BadDrawable errors when I close the window. In the meantime, it makes sense to help draw the error out by calling XSync to flush before closing the X Display connection 2018-02-03 14:38:10 -08:00
Jonathan Campbell
fc5ce83b70 SDL 1.x X11 video UpdateRects should be reset to NULL if OpenGL surface 2018-02-03 14:32:59 -08:00
Jonathan Campbell
54dd9d8509 SDL 1.x please dont use X11 video mode functions either. Disable XV support as well because we dont use the overlay 2018-02-02 12:21:46 -08:00
Jonathan Campbell
791e62df93 SDL 1.x: Please dont use xrandr, I dont want SDL changing my monitor resolution 2018-02-02 12:19:12 -08:00
Jonathan Campbell
d0e91f6561 output=opengl make resizing flicker-free. Modify SDL 1.x OpenGL to create a window with no background pixel to accomplish flicker-free OpenGL resize 2018-01-30 10:43:36 -08:00
Jonathan Campbell
110cf5da55 SDL 1.x modify X11 output NOT to set a background pixel, to avoid redraw flickering when the user resizes the window 2018-01-30 10:19:24 -08:00
Jonathan Campbell
f99527569c always take resize events, dont ignore just because of pending. its killing the ability to take resize events at all 2018-01-30 08:11:32 -08:00
Jonathan Campbell
13564f6321 WIndows SDL 1.x: Increase MAXEVENTS queue size, because merely accessing the system menu triggers enough messages to overflow it in Windows 10. This makes it possible to handle WM_SYSCOMMAND again. 2018-01-06 22:07:41 -08:00
Jonathan Campbell
21c98db3e6 Windows SDL 1.x: Remove stdout/stderr redirection from SDL 1.x main code. It's not needed, and it causes problems and invalid state when you run DOSBox-X from an administrator-owned folder like Program Files. 2017-12-25 21:55:00 -08:00
Jonathan Campbell
5b8c0b5ebc VS2017: More magic finangling to get VS2017 SDL2 builds to work again while keeping excess files out of the output directory. 2017-12-24 16:54:57 -08:00
Jonathan Campbell
3541724dc9 VS2017: Stop putting the compiled .LIB files in the Release directory alongside the final binary. 2017-12-24 14:44:12 -08:00
Jonathan Campbell
1ac8deb63c Windows: Add PEHDR-LITE to project (thanks roytam1) as build step to patch EXE header for Windows XP compat. Modify PEHDR-LITE slightly to shut VS2017 up about "unsafe" C runtime functions. Modify other VS2017 projects to compensate for this weird obsession in VS2017 with precompiled headers. 2017-12-23 08:41:33 -08:00
Jonathan Campbell
1e82f2aab4 Windows: VS2017's XP target is broken (_stat on XP is broken), switch back to working target. This makes Vista the minimum system again, however. 2017-12-23 01:23:14 -08:00
Jonathan Campbell
7186bce180 Linux SDL 1.x PS3 SixAxis gamepad patch (#194) 2017-12-22 17:01:09 -08:00
Jonathan Campbell
3fe254dba3 SDL 1.x linux: PulseAudio 8.0 does not protect itself against SDL 1.x
sending audio from the audio thread while the main thread calls
SDL_WM_SetCaption. Have main thread function simply copy the string and
store it as "pending" and then have the SDL audio thread apply it as
part of waiting for PulseAudio, to avoid the conflict.
2017-12-20 09:23:01 -08:00
Jonathan Campbell
000b757ecb Linux SDL 1.x: Fix SDL audio deadlock/hang issue with PulseAudio
by locking the audio thread before sending the new caption to
PulseAudio. Apparently the SDL audio thread combined with rapid
calls to SDL_WM_SetCaption() can eventually cause a deadlock
within the PulseAudio client library, this *should* fix it.
2017-12-20 00:18:36 -08:00
Jonathan Campbell
ee4c02a2ee VS2017 Windows: Change compile flags and copy DXGUID.LIB from the DirectX SDK to compile Windows XP-compatible binaries. And This time (*ahem* pay attention VS2017) make sure to commit the changed VCPROJ files. 2017-12-15 21:25:34 -08:00
Jonathan Campbell
be95116f2a SDL 1.x Windows: On handling mouse button events, process mouse motion FIRST before entering button events, to make sure that the host application has the correct cursor position when processing SDL button events. This fixes guest pointer integration problems on Windows builds when the guest OS is, say, Windows 3.1. 2017-12-15 18:46:06 -08:00
Jonathan Campbell
f343dc2ec0 Windows SDL 1.x: When using the windib surface output, impose a 60Hz cap on mouse motion polling to prevent large random sudden jumps in games. Windows 10 it seems has round-trip delay between SetCursorPos and GetCursorPos and cursor position which is enough to throw off SDL 1.x's initial implementation of GDI mouse motion detection. 2017-12-15 08:07:25 -08:00
Jonathan Campbell
c2e2c2ffc0 SDL 1.x fails to compile on CentOS because _XData32 changed it's function definition slightly
to make one parameter const, therefore a redefinition and compile fail. Turn off dynamic
loading of X11 to fix.
2017-12-14 10:11:42 -08:00
Jonathan Campbell
a4a2c15fbd Revert "Let's just disable PulseAudio entirely in our SDL builds and be done"
This reverts commit b70a024a0806429b49ede0b86969be9aa74ce790.

Okay fine PulseAudio. I pulled in SDL 1.x for a reason, and here it is.
The audio thread handling needs to be fixed, just as the Windows builds
need to fix the SDL 1.x issue with relative mouse motion. This is why.
Time to start hacking. If it makes it incompatible with the main SDL 1.x
library at this point I don't care, it's time to fix this nonsense.
2017-12-14 02:08:52 -08:00
Jonathan Campbell
b70a024a08 Let's just disable PulseAudio entirely in our SDL builds and be done
with it.
2017-12-14 02:00:00 -08:00
Jonathan Campbell
816e0464fc Revert "I have no idea if this fixes it, but, try NOT dynamically loading"
This reverts commit 1f932a602c3ff9fc5fc92c150291795b6d8aca75.

The change does absolutely nothing, at all. PulseAudio likes to hang on
audio closure, randomly stop playing audio, or just assert() because
something about no event pending at some critical point.

PulseAudio lovers will probably tell me I'm not using the API properly,
which isn't the point. If talking to the API is so delicate that not
even the SDL 1.x devs can handle it properly (and they handle a lot of
strange cases in their code), then your API sucks.

This was written by the same guy who wrote SystemD??? Yikes.
2017-12-13 23:14:37 -08:00
Jonathan Campbell
1f932a602c I have no idea if this fixes it, but, try NOT dynamically loading
pulseaudio's shared library.
2017-12-13 22:50:53 -08:00
Jonathan Campbell
d2d9d7d376 more 2017-12-13 16:05:46 -08:00
Jonathan Campbell
9d6b5dca97 DOSBox SDL 1.x build script 2017-12-13 16:04:55 -08:00
Jonathan Campbell
ff295c7298 Revert "Start using our internal SDL 1.x instead of system SDL 1.x, stage 1"
This reverts commit a7fbca96d35abbab5224f28ceb5251da7af87f70.
2017-12-13 15:46:30 -08:00
Jonathan Campbell
d5dd02d7b8 Revert "Put the original VS2015 SDL_config.h back"
This reverts commit 1e7ed94616405787b28ae89e50dca1e29c95cafd.
2017-12-13 15:46:25 -08:00
Jonathan Campbell
9ab759cc81 Revert "Stage 2"
This reverts commit 6bf6170556ff5fdbb32495212fa3a9d25640b4bd.
2017-12-13 15:46:19 -08:00
Jonathan Campbell
6bf6170556 Stage 2 2017-12-13 14:42:00 -08:00
Jonathan Campbell
1e7ed94616 Put the original VS2015 SDL_config.h back 2017-12-13 14:26:44 -08:00
Jonathan Campbell
a7fbca96d3 Start using our internal SDL 1.x instead of system SDL 1.x, stage 1 2017-12-13 14:25:03 -08:00
Jonathan Campbell
f5a973e8f1 VS2015 create SDL2 targets (Debug and Release). They don't compile yet, but this is the start of it. 2017-12-08 14:54:12 -08:00
Aybe
1a5dae64f8 user preferences should not be tracked 2017-08-24 03:13:04 +02:00