Commit Graph

97 Commits

Author SHA1 Message Date
Ger Schinkel
076390e911 Fixed potential array out of bounds condition when break would never trigger. 2024-03-29 12:44:46 +01:00
robxnano
249dfc84ae Revert "SDL2: Stop hotkey commands accepting both Alt and Super when swap_opt_cmd = true"
The previous revert failed.
This reverts commit e28a9fc3a9.
2022-09-30 23:31:41 +01:00
robxnano
4c1c549ed6 Revert SDL2 hotkey code to original version
This reverts commits 3b7a89aad9
and e28a9fc3a9.
2022-09-30 23:09:23 +01:00
robxnano
3b7a89aad9 Moved code to set hotkey down bools to kc_decode
- Now hotkey message should always match the actual key
2022-09-27 18:25:27 +01:00
robxnano
4724ce7aee Fix build when X11 fbdev is enabled 2022-09-26 22:47:25 +01:00
robxnano
95f1d46bae Implemented swap_opt_cmd and hotkey prefs for X11 video 2022-09-26 21:00:16 +01:00
robxnano
92778586de Fixes for building with X11 backend 2022-09-26 18:07:56 +01:00
emendelson
0e01e5c91e New icons; removed unused icon code
Replace (again) the Windows and MacOS icons and remove the c-file icons and the reference to them in the source.
2020-03-26 20:27:24 -04:00
emendelson
8ca7815baf Updated icons; add Windows medium icon
Replace the existing icons with the 7/8 design; add a 48x48 icon for the Windows build.
2020-03-22 14:00:18 -04:00
David O'Shea
9e2fc30ecd Basilisk II: Add icons for X11 based on the MacOS X icons (fixes #160).
Note that it appears that a 'make clean' may be required due to the
change in user_strings_unix.h failing to cause all of the modules that
include it to be rebuilt.
2017-12-31 12:10:30 +10:30
Christian Bauer
b4940ae29d more cleanups (unused/uninitialized variables, forgotten free()s, etc.) 2012-09-08 12:33:39 +02:00
cebix
dca3b18d9d fixed warnings 2010-02-21 12:00:42 +00:00
asvitkine
3e12a80a3b [Patch by Mike Sliczniak]
I was testing some other SS patches and I noticed that when I ran an X11
build of SS there were not all the video modes I expected in the the
control strip. Mac OS X 10.5 changed the form of the DISPLAY environment
variable. The reason for this is that the DISPLAY variable looks like
this in Leopard:

/tmp/launch-XXXXXX/:0

The Xs are like in mktemp.
2009-02-19 07:09:35 +00:00
gbeauche
c8cb4879a4 Happy New Year! 2008-01-01 09:40:36 +00:00
gbeauche
0a7fe2eaf8 Workaround video mode switch problems. IOW, make sure to always allocate
the frame buffer at the same base address.
2007-06-14 14:45:54 +00:00
gbeauche
a2840298b0 - factor out native_byte_order determination
- fix ExpandMap[] when client X image byte order is different than host's
  e.g. { mips, ppc } -> x86 in 8 bpp mode
2006-01-03 22:03:27 +00:00
gbeauche
369d01cf16 %Ld is for long double, not long long (%lld) 2005-06-11 06:52:22 +00:00
gbeauche
0f0b06b099 Much improved responsiveness on NetBSD systems.
On those systems, it's really hard to get high resolution timings and the
system oftens fails to honour a timeout in less than 20 ms. The idea here
is to have an average m68k instruction count (countdown quantum) that
triggers real interrupt checks. The quantum is calibrated every 10 ticks
and has a 1000 Hz resolution on average.
2005-06-11 06:43:24 +00:00
gbeauche
31f80e338b Fix DGA when visible screen is smaller than virtual display, aka fix
fullscreen mode when VidMode extension is enabled. Also fix SDL fullscreen
to really update the screen as this is necessary by default on Linux since
simple windowed is used (and not DGA for fullscreen).

Always prefer the 64 pixel chunks update code.

Rearrange B2 video_x.cpp to match video_vosf.h updates
2005-05-12 11:09:31 +00:00
gbeauche
e8ac4897b6 Enable multiple depths in fullscreen DGA modes, i.e. add 1-bit to 16/32-bit
blitters, rewrite update_display_dga_vosf() to actually work with sub byte
pixels. Factor out update_display_window_vosf() since it's long time that
it is no longer checking for first column and last column that have changed.
2005-03-28 16:14:25 +00:00
gbeauche
04a331e827 Avoid use of pthread_cancel() for redraw thread cancellation. Use an extra
variable to acknowledge cancellation. This avoids Xserver events queue
corruption when clipboard is in use. Concretely, this fixes following errors:
Xlib: unexpected async reply (sequence 0xHEX)!
2005-03-21 23:57:34 +00:00
gbeauche
30632aed4f Happy New Year! 2005-01-30 21:42:16 +00:00
gbeauche
61e223471b Force use of MacX mappings with Apple's X server 2004-12-18 19:28:33 +00:00
gbeauche
ce67261af4 lock X11 display better around update_display_window_vosf() 2004-11-15 23:40:23 +00:00
gbeauche
e85f4397c8 Backport copy-paste of 'TEXT' from SheepShaver 2004-11-15 23:27:43 +00:00
gbeauche
e3c5f1769d Enable 33-bit memory addressing on 64-bit JIT capable platforms (e.g. x86-64).
This is useful to get rid of address offset sign extensions. It uses POSIX
shared memory to create aliased regions, fallback to usual sign-extension
way if shm_open et al. don't work (e.g. no /dev/shm mounted)
2004-11-08 21:07:07 +00:00
gbeauche
19494038b3 Initial SDL/video support. Fix VOSF code could lead to a crash on run-time
resolution/depth switching. Rearrange blitter lookup code, aka make it cleaner.
2004-06-23 14:30:48 +00:00
cebix
9e7932abf0 Happy New Year! :) 2004-01-12 15:29:31 +00:00
gbeauche
548e5a3dfd Rearrange video_vosf.h to accomodate both SheepShaver and BasiliskII video
infrastructure. Make video_blit.cpp a little more emulator independent.
2003-05-22 22:13:56 +00:00
gbeauche
98d1246815 - Let fullscreen DGA mode work again, even with a DirectColor visual. In
that case, we do need add it when creating the window otherwise we
  result int a nice BadMatch for X_CreateWindow request. FIXME?
- Fix typo and do enable VOSF in DGA mode, if necessary.
2002-09-28 12:42:39 +00:00
cebix
00a32a9afb fixed compilation problem in fbdev code 2002-04-28 12:09:23 +00:00
cebix
8871da753d - added infrastructure for multi-monitor support; only video_x.cpp is
converted for the new scheme; not actually tested with a mult-monitor
  setup yet but at least single-monitor display doesn't seem to be broken
  (UAE banked addressing would definitely require some extensions to handle
  multiple frame buffers)
- struct video_mode has an extra field that is free for use by platform-
  specific code
2002-04-25 11:00:31 +00:00
cebix
78254ebddd added missing return values 2002-03-20 19:03:41 +00:00
cebix
7627f346ee cleaned up pthread attributes [Brian Johnson] 2002-02-07 16:10:57 +00:00
cebix
628533940d - documentation updates
- 2001 -> 2002
- version 0.9 -> 1.0
2002-01-15 14:58:43 +00:00
gbeauche
55df210d27 - video_x.cpp: the_buffer shall always be mapped through vm_alloc() so
that it can be vm_protect()'ed at will afterwards
- video_x.cpp: let driver_base free() the_buffer_copy and the_host_buffer,
  if necessary
- video_vosf.h: reverted to use malloc() for mainBuffer.dirtyPages and
  mainBuffer.pageInfo
- vm_alloc.cpp: small cleanups
- fixed typos
2001-07-14 18:41:05 +00:00
cebix
20db0c7260 - 1-bit mode under X11 always uses default visual
- fixed possible crash in driver_window dtor (image data would be freed twice,
  once by XDestroyImage() and once in driver_base dtor)
- fixed compilation problems with banked memory
- fixed typos
2001-07-14 15:02:49 +00:00
cebix
90c7198b75 fixed a couple of compiler warnings 2001-07-11 19:26:14 +00:00
cebix
5fa9b2abe9 - find_visual_for_depth() did not return true on success 2001-07-11 17:04:41 +00:00
cebix
456830630c - background_pixel, border_pixel and colormap attributes of window are now
always set as this seems to be required for non-default visuals
2001-07-10 15:50:57 +00:00
cebix
5868a40a37 - ADB has its own interrupt flag, INTFLAG_ADB
- ADBMouseMoved(), ADBMouseDown/Up() and ADBKeyDown/Up() trigger the ADB
  interrupt
- ADB mutex is only used for mouse movement (the only input state where it
  matters)
- adb.cpp: toggling relative mouse mode resets mouse_x/y
- PrimeTime(0) schedules a timer task with 0 delay time; this is still not
  the correct implementation, but it makes MacSyndicate work...
- Unix: pthreads are preferred to POSIX.4 timers for 60Hz ticks because the
  timers drift badly under Linux and the thread can compensate for drifting
  well enough
- Unix: moved GetTicks_usec() and Delay_usec() to timer_unix.cpp
- video_x.cpp: X mouse acceleration is disabled in relative mouse mode because
  MacOS does its own acceleration
- video_x.cpp: palette[].pixel and palette[].flags are always preset
- video_x.cpp: decoupled X event handling from 60Hz video refresh cycle by
  using select() with a timeout on the X fd
2001-07-09 11:22:01 +00:00
gbeauche
8d733ed691 - added video_vosf_init()/video_vosf_exit() for initialization and destruction
of the internal structures used for the VOSF system
- use vm_acquire()/vm_release() for VOSF buffers and hope the_buffer is
  allocated above RAM address space (temporary workaround for 64-bit
  addressing systems)
- don't free() screen buffers in driver_base dtor
- don't free() memory mapped buffers in driver_base dtor
2001-07-07 09:14:47 +00:00
cebix
64eb0dcad1 fixed memory leaks in video mode switching 2001-07-06 22:37:23 +00:00
cebix
0e7b5acffe added support for 2/4-bit modes on 8-bit visuals 2001-07-06 22:00:39 +00:00
cebix
1186b42a20 - an appropriate visual is selected for the requested Mac color depth
- the list of supported Mac color depths is constructed from the list of
  depth and visuals supported by the X server
2001-07-06 20:49:53 +00:00
cebix
d0a4b3e5fc - improved compatibility of multiple depth/resolution handling with versions
of MacOS before 7.6:
   - Apple mode IDs are now allocated contiguously from 0x80 (the video_*.cpp
     module must call video_init_depth_list() after adding all modes)
   - if the video driver didn't receive a GetVideoParameters call, it patches
     ScrnBase and the main GDevice upon a video mode switch (otherwise MacOS
     will continue to use the old frame buffer base)
   - the rowBytes values in the video parameters slot resources are correct
     for all bit depths
2001-07-03 19:20:47 +00:00
cebix
cf22cb032a - added support for platform-independant mutexes, currently only properly
implemented under Unix
- adb.cpp uses mutexes for thread-safe mouse handling
- video_x.cpp: pressing Ctrl-F5 in windowed mode switches to a "grabbed"
  relative mouse mode, useful for some games
- video_x.cpp: fixed some bugs relating to the hotkeys (key releases are no
  longer treated as hotkeys)
2001-07-03 15:59:49 +00:00
cebix
5bd08dac88 - video_set_palette() gets passed the number of used palette entries
- video_x.cpp supports 2- and 4-bit modes on truecolor screens
2001-07-01 21:09:30 +00:00
cebix
f4243a191b added support for 8-bit windowed modes on 16 and 32-bit screens (for the
games, man, the games! :-)
2001-07-01 19:57:55 +00:00
cebix
af35353cf0 - sony.cpp/disk.cpp/cdrom.cpp use vector<> of drive_info objects instead of
linked list
- color depth switching updates slot ROM
- video_x.cpp always supports 1-bit window modes
- timer_create()/clock_gettime() are pulled from librt if present
2001-07-01 14:38:03 +00:00