Commit graph

432 commits

Author SHA1 Message Date
Sam Lantinga
95dbe47cf3 Fixed test 2011-01-27 20:51:54 -08:00
Sam Lantinga
858c92ff35 Added CPU cache line size to the test output. 2011-01-27 20:49:07 -08:00
Sam Lantinga
772009b691 Bump up the default cache line size. 2011-01-27 16:51:47 -08:00
Sam Lantinga
fb824f9a04 Added cache line size info in SDL_cpuinfo.h
I also added an implementation to dynamically query it, but didn't expose it since most x86 CPUs have an L1 cache line size of 64 bytes.
2011-01-27 16:46:15 -08:00
Sam Lantinga
1d518f0d73 Fixed compiling under Visual Studio 2011-01-27 15:31:00 -08:00
krogoway
e253e1d991 When the last window is closed and the SDL_WINDOWEVENT_CLOSE event is sent, send the SDL_QUIT event.
Common.c now destroys the SDL_Window upon a SDL_WINDOWEVENT_CLOSE event to ensure that all windows get closed properly and the new code to handle the last window closes gets executed.
2011-01-27 15:58:30 -06:00
Sam Lantinga
b58487d8bb Colin Leroy 2011-01-26 04:24:20 PST
the pthread implementation of SDL_SemWaitTimeout() uses busy waiting, while
pthread's sem_timedwait() does work. Attached are patches that make use of it
2011-01-27 00:34:12 -08:00
Sam Lantinga
9b3ce56bfd Since we're directly reading and writing 'active' from different threads, it needs to be flagged volatile. 2011-01-26 19:20:16 -08:00
Sam Lantinga
b609519a5c Added a test to measure the impact of a separate thread periodically locking the queue entirely. 2011-01-26 00:03:34 -08:00
Sam Lantinga
bbc1ba223a Added a FIFO test to the atomic test suite.
This is really useful because we might be able to use something like this
for the SDL event queue.
2011-01-25 23:23:52 -08:00
Sam Lantinga
10b8372bd3 Fixed compiling on Windows Mobile SDK 5.0 with Visual Studio 2008 2011-01-24 15:46:11 -08:00
krogoway
a2f2302255 Renamed SDL_keysym to SDL_KeySym
Renamed SDL_scancode to SDL_ScanCode
Added #defines to SDL_compat.h
2011-01-24 13:47:35 -06:00
Sam Lantinga
9d25ba272a Fixed bug #925
Changed "win32" to "windows"

--HG--
rename : include/SDL_config_win32.h => include/SDL_config_windows.h
rename : src/events/scancodes_win32.h => src/events/scancodes_windows.h
rename : src/haptic/win32/SDL_syshaptic.c => src/haptic/windows/SDL_syshaptic.c
rename : src/joystick/win32/SDL_dxjoystick.c => src/joystick/windows/SDL_dxjoystick.c
rename : src/joystick/win32/SDL_dxjoystick_c.h => src/joystick/windows/SDL_dxjoystick_c.h
rename : src/joystick/win32/SDL_mmjoystick.c => src/joystick/windows/SDL_mmjoystick.c
rename : src/loadso/win32/SDL_sysloadso.c => src/loadso/windows/SDL_sysloadso.c
rename : src/main/win32/SDL_win32_main.c => src/main/windows/SDL_windows_main.c
rename : src/main/win32/version.rc => src/main/windows/version.rc
rename : src/thread/win32/SDL_sysmutex.c => src/thread/windows/SDL_sysmutex.c
rename : src/thread/win32/SDL_syssem.c => src/thread/windows/SDL_syssem.c
rename : src/thread/win32/SDL_systhread.c => src/thread/windows/SDL_systhread.c
rename : src/thread/win32/SDL_systhread_c.h => src/thread/windows/SDL_systhread_c.h
rename : src/thread/win32/win_ce_semaphore.c => src/thread/windows/win_ce_semaphore.c
rename : src/thread/win32/win_ce_semaphore.h => src/thread/windows/win_ce_semaphore.h
rename : src/timer/win32/SDL_systimer.c => src/timer/windows/SDL_systimer.c
rename : src/video/win32/SDL_ceddrawrender.c => src/video/windows/SDL_ceddrawrender.c
rename : src/video/win32/SDL_ceddrawrender.h => src/video/windows/SDL_ceddrawrender.h
rename : src/video/win32/SDL_d3drender.c => src/video/windows/SDL_d3drender.c
rename : src/video/win32/SDL_d3drender.h => src/video/windows/SDL_d3drender.h
rename : src/video/win32/SDL_gapirender.c => src/video/windows/SDL_gapirender.c
rename : src/video/win32/SDL_gapirender.h => src/video/windows/SDL_gapirender.h
rename : src/video/win32/SDL_gapirender_c.h => src/video/windows/SDL_gapirender_c.h
rename : src/video/win32/SDL_gdirender.c => src/video/windows/SDL_gdirender.c
rename : src/video/win32/SDL_gdirender.h => src/video/windows/SDL_gdirender.h
rename : src/video/win32/SDL_msctf.h => src/video/windows/SDL_msctf.h
rename : src/video/win32/SDL_vkeys.h => src/video/windows/SDL_vkeys.h
rename : src/video/win32/SDL_win32clipboard.c => src/video/windows/SDL_windowsclipboard.c
rename : src/video/win32/SDL_win32clipboard.h => src/video/windows/SDL_windowsclipboard.h
rename : src/video/win32/SDL_win32events.c => src/video/windows/SDL_windowsevents.c
rename : src/video/win32/SDL_win32events.h => src/video/windows/SDL_windowsevents.h
rename : src/video/win32/SDL_win32gamma.c => src/video/windows/SDL_windowsgamma.c
rename : src/video/win32/SDL_win32gamma.h => src/video/windows/SDL_windowsgamma.h
rename : src/video/win32/SDL_win32keyboard.c => src/video/windows/SDL_windowskeyboard.c
rename : src/video/win32/SDL_win32keyboard.h => src/video/windows/SDL_windowskeyboard.h
rename : src/video/win32/SDL_win32modes.c => src/video/windows/SDL_windowsmodes.c
rename : src/video/win32/SDL_win32modes.h => src/video/windows/SDL_windowsmodes.h
rename : src/video/win32/SDL_win32mouse.c => src/video/windows/SDL_windowsmouse.c
rename : src/video/win32/SDL_win32mouse.h => src/video/windows/SDL_windowsmouse.h
rename : src/video/win32/SDL_win32opengl.c => src/video/windows/SDL_windowsopengl.c
rename : src/video/win32/SDL_win32opengl.h => src/video/windows/SDL_windowsopengl.h
rename : src/video/win32/SDL_win32shape.c => src/video/windows/SDL_windowsshape.c
rename : src/video/win32/SDL_win32shape.h => src/video/windows/SDL_windowsshape.h
rename : src/video/win32/SDL_win32video.c => src/video/windows/SDL_windowsvideo.c
rename : src/video/win32/SDL_win32video.h => src/video/windows/SDL_windowsvideo.h
rename : src/video/win32/SDL_win32window.c => src/video/windows/SDL_windowswindow.c
rename : src/video/win32/SDL_win32window.h => src/video/windows/SDL_windowswindow.h
rename : src/video/win32/wmmsg.h => src/video/windows/wmmsg.h
2011-01-20 18:04:05 -08:00
Sam Lantinga
2c7a66fb27 Removed extra space 2011-01-19 11:35:31 -08:00
Sam Lantinga
42a3df6fd3 Michael gave permission to use his test code 2011-01-18 10:57:28 -08:00
Sam Lantinga
f82346f528 Fixed compiler errors 2011-01-17 13:54:13 -08:00
Sam Lantinga
ce2e619ac9 Fixed compiler warning 2011-01-16 17:48:04 -08:00
Sam Lantinga
d428d9d5a1 Include windows.h in SDL_atomic.h by default, but don't include the atomic API in SDL.h
This allows all SDL code to take advantage of the atomic intrinsics on Windows, but doesn't cause applications just including SDL.h to pull in windows.h
2011-01-16 17:45:42 -08:00
Sam Lantinga
b0e0f61c7e Added native atomic operations for Windows, Mac OS X, and gcc compiler intrinsics.
Changed the CAS return value to bool, so it's efficient with OSAtomicCompareAndSwap32Barrier()
Added an atomic test adapted from code by Michael Davidsaver
2011-01-16 15:16:39 -08:00
Sam Lantinga
1bc8fe69ce Updated the atomic API for better use cases 2011-01-15 12:41:59 -08:00
Sam Lantinga
fdea37a756 Added some missing pixel formats and SDL_GetPixelFormatName() 2011-01-12 14:53:23 -08:00
Sam Lantinga
3693a452e6 Need to include SDL_main.h ... eh, just include everything. :) 2011-01-10 11:22:07 -08:00
Sam Lantinga
6736ca0525 Android has OpenGL ES too... 2011-01-04 20:37:07 -08:00
Sam Lantinga
aac820df50 Missing math library for testgesture 2011-01-01 20:44:38 -08:00
Sam Lantinga
34b38d2798 Allow META-Enter to toggle fullscreen mode 2011-01-01 19:38:56 -08:00
Sam Lantinga
35cc558917 Use the enumerated type for blend and scale mode instead of int
Renamed SDL_TextureScaleMode to SDL_ScaleMode
2010-12-12 15:19:05 -08:00
Sam Lantinga
dc22c27aad Fixed crash if the gesture coordinates go negative - FIXME: Should this protection be at a lower level? 2010-11-30 18:08:01 -08:00
Sam Lantinga
f7fc00e75c Added a Visual Studio project for testgesture 2010-11-30 12:38:46 -08:00
Andreas Schiffler
80c83499bf Remove superflous sample shapes (same BMPs) 2010-09-15 22:33:46 -07:00
Andreas Schiffler
1975b91fae - added directx include path to VS2008 solution
- updated shape vcproj and add it to VS2008 solution
- minor changes (i.e. typecasting) to get rid of compiler warnings in VS
2010-09-15 22:15:47 -07:00
Sam Lantinga
7c463932c2 Merged Eli's Google Summer of Code work from SDL-gsoc2010-shaped_windows
--HG--
rename : VisualC/SDL.sln => VisualC/SDL_VS2005.sln
2010-08-22 13:45:56 -07:00
Sam Lantinga
1f8dacabd7 Merged Daniel's Google Summer of Code work from SDL-gsoc2010_IME 2010-08-22 12:39:27 -07:00
Sam Lantinga
238acbd53d Merged Jim's Google Summer of Code work from SDL-gsoc2010_gesture 2010-08-22 12:07:55 -07:00
Sam Lantinga
9b8ec5c66a Don't need to use strlen() to determine if there's text.
Use the SDL safe strcpy() function
2010-08-22 11:56:07 -07:00
egottlieb
781d130602 Raised binarization cutoff to eliminate alpha-blending of trollface. 2010-08-16 09:55:35 -04:00
Eli Gottlieb
61aae3b891 Added last test shape. Because. 2010-08-15 21:46:46 -04:00
Jim Grandpre
794c5cb3ee Added README.touch and README.gesture. Moved touchtest/gestureSDLTest to test/testgesture 2010-08-15 00:36:28 -04:00
egottlieb
4e4cb86ffe Finally got the Win32 API code for shaping to work! Just need to fix SDL_CalculateShapeTree() now! 2010-08-14 16:14:36 -04:00
Jjgod Jiang
43cd4e54ac Fix for deleting the last uncommit character 2010-08-12 16:00:47 +02:00
egottlieb
1b9202537c Updated shapes folder. 2010-08-09 16:26:45 -04:00
egottlieb
cd2d456d46 Fixed lots of little bugs in Win32 shaping and in SDL_CalculateShapeTree(). Still not actually showing anything on Windows, though there's no crashes and everything compiles fine. Bugger. 2010-08-06 20:22:14 -04:00
egottlieb
c95526b7ce Improving Cocoa implementation and fixed a small bug in SDL_shape.c. 2010-08-05 18:58:45 -04:00
Eli Gottlieb
6c23f8c602 Fixed a couple of bugs in the general and X11 shape code, and fixed a bug in testshape that was keeping it from recognizing surfaces without alpha. Thanks to Andreas's bit-bashing tip, X11 shaped windows now work entirely, AFAICT. 2010-08-01 21:10:42 -04:00
Eli Gottlieb
0e0ad58e1f Added Andreas's VS2010 patch for testshape. 2010-07-30 18:04:21 -04:00
Sam Lantinga
a57835d4af Added missing pixel format 2010-07-28 01:32:39 -07:00
Eli Gottlieb
3433f10279 Added shapes folder to hg. 2010-07-26 21:49:32 -04:00
Eli Gottlieb
155833dd81 Rejiggering the way shaped windows are created as preparation for OS X implementation. Fixed overdrive bug in test program that appears to have been introduced by someone other than myself. 2010-07-26 17:27:04 -04:00
dewyatt
cae6f1376d Correctly draw cursor based on position.
Had to add UTF-8 functions utf8_length, utf8_next, utf8_advance.
2010-07-25 13:17:31 -04:00
dewyatt
1d79a9b5d8 Changed markedText to have its own storage to resolve multiple bugs.
Changed an odd strcpy to a more appropriate strcat.
2010-07-24 20:48:50 -04:00
Eli Gottlieb
6cc1b97fc5 More work on color-key mode. 2010-07-23 01:48:42 -04:00