Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libSDL
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PocketInsanity
libSDL
Commits
cc8ad7be
Commit
cc8ad7be
authored
15 years ago
by
jimtla
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More fixes for windows. Disabled tablet code.
parent
94b3f88f
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
76 additions
and
16 deletions
+76
-16
SDL.vcproj
VisualC/SDL/SDL.vcproj
+6
-3
SDL_win32events.c
src/video/win32/SDL_win32events.c
+43
-7
SDL_win32video.h
src/video/win32/SDL_win32video.h
+8
-1
SDL_win32window.c
src/video/win32/SDL_win32window.c
+5
-1
wmmsg.h
src/video/win32/wmmsg.h
+2
-2
touchTest.c
touchTest/touchTest.c
+2
-1
touchTest2.ncb
touchTest/touchTest2/touchTest2.ncb
+0
-0
touchTest2.suo
touchTest/touchTest2/touchTest2.suo
+0
-0
SDL.dll
touchTest/touchTest2/touchTest2/SDL.dll
+0
-0
touchTest2.vcproj
touchTest/touchTest2/touchTest2/touchTest2.vcproj
+10
-1
No files found.
VisualC/SDL/SDL.vcproj
View file @
cc8ad7be
...
...
@@ -77,18 +77,21 @@
/>
<Tool
Name=
"VCLinkerTool"
AdditionalOptions=
"/MACHINE:I386"
AdditionalOptions=
"/MACHINE:I386

msvcrt.lib
"
AdditionalDependencies=
"msimg32.lib winmm.lib"
OutputFile=
".\Debug/SDL.dll"
LinkIncremental=
"2"
SuppressStartupBanner=
"true"
IgnoreAllDefaultLibraries=
"true"
IgnoreAllDefaultLibraries=
"false"
IgnoreDefaultLibraryNames=
""
GenerateDebugInformation=
"true"
ProgramDatabaseFile=
".\Debug/SDL.pdb"
SubSystem=
"
2
"
SubSystem=
"
0
"
RandomizedBaseAddress=
"1"
DataExecutionPrevention=
"0"
ImportLibrary=
".\Debug/SDL.lib"
Profile=
"true"
CLRThreadAttribute=
"0"
CLRUnmanagedCodeCheck=
"false"
/>
<Tool
...
...
This diff is collapsed.
Click to expand it.
src/video/win32/SDL_win32events.c
View file @
cc8ad7be
...
...
@@ -20,9 +20,9 @@
slouken@libsdl.org
*/
#if (_WIN32_WINNT < 0x
05
01)
#if (_WIN32_WINNT < 0x
6
01)
#undef _WIN32_WINNT
#define _WIN32_WINNT 0x
05
01
#define _WIN32_WINNT 0x
6
01
#endif
#include "SDL_config.h"
...
...
@@ -32,11 +32,14 @@
#include "SDL_vkeys.h"
#include "../../events/SDL_events_c.h"
/*#define WMMSG_DEBUG*/
#define WMMSG_DEBUG
#ifdef WMMSG_DEBUG
#include <stdio.h>
#include <stdio.h>
#include "wmmsg.h"
#endif
//#include <stdio.h>
/* Masks for processing the windows KEYDOWN and KEYUP messages */
#define REPEATED_KEYMASK (1<<30)
...
...
@@ -125,9 +128,10 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
if
(
!
data
)
{
return
CallWindowProc
(
DefWindowProc
,
hwnd
,
msg
,
wParam
,
lParam
);
}
#ifdef WMMSG_DEBUG
{
FILE
*
log
=
fopen
(
"wmmsg.txt"
,
"a"
);
{
FILE
*
log
=
fopen
(
"wmmsg.txt"
,
"a"
);
fprintf
(
log
,
"Received windows message: %p "
,
hwnd
);
if
(
msg
>
MAX_WMMSG
)
{
fprintf
(
log
,
"%d"
,
msg
);
...
...
@@ -643,7 +647,39 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
}
returnCode
=
0
;
break
;
}
case
WM_TOUCH
:
{
//printf("Got Touch Event!\n");
FILE
*
log
=
fopen
(
"wmmsg.txt"
,
"a"
);
fprintf
(
log
,
"Received Touch Message: %p "
,
hwnd
);
if
(
msg
>
MAX_WMMSG
)
{
fprintf
(
log
,
"%d"
,
msg
);
}
else
{
fprintf
(
log
,
"%s"
,
wmtab
[
msg
]);
}
fprintf
(
log
,
"WM_TOUCH = %d -- 0x%X, 0x%X
\n
"
,
msg
,
wParam
,
lParam
);
fclose
(
log
);
}
break
;
case
WM_GESTURE
:
{
//printf("Got Touch Event!\n");
FILE
*
log
=
fopen
(
"wmmsg.txt"
,
"a"
);
fprintf
(
log
,
"Received Gesture Message: %p "
,
hwnd
);
if
(
msg
>
MAX_WMMSG
)
{
fprintf
(
log
,
"%d"
,
msg
);
}
else
{
fprintf
(
log
,
"%s"
,
wmtab
[
msg
]);
}
fprintf
(
log
,
"WM_GESTURE = %d -- 0x%X, 0x%X
\n
"
,
msg
,
wParam
,
lParam
);
fclose
(
log
);
}
break
;
}
/* If there's a window proc, assume it's going to handle messages */
if
(
data
->
wndproc
)
{
...
...
This diff is collapsed.
Click to expand it.
src/video/win32/SDL_win32video.h
View file @
cc8ad7be
...
...
@@ -30,7 +30,14 @@
#define STRICT
#define UNICODE
#undef WINVER
#define WINVER 0x500
/* Need 0x410 for AlphaBlend() and 0x500 for EnumDisplayDevices() */
//#define WINVER 0x500 /* Need 0x410 for AlphaBlend() and 0x500 for EnumDisplayDevices() */
#define WINVER 0x601
/* Need 0x600 (_WIN32_WINNT_WIN7) for WM_Touch */
#if (_WIN32_WINNT < 0x601)
#undef _WIN32_WINNT
#define _WIN32_WINNT 0x601
#endif
#include <windows.h>
#if SDL_VIDEO_RENDER_D3D
...
...
This diff is collapsed.
Click to expand it.
src/video/win32/SDL_win32window.c
View file @
cc8ad7be
...
...
@@ -256,7 +256,8 @@ WIN_CreateWindow(_THIS, SDL_Window * window)
WIN_SetError
(
"Couldn't create window"
);
return
-
1
;
}
/*Disable Tablet support, replace with multi-touch.*/
#if 0
/* we're configuring the tablet data. See Wintab reference for more info */
if (videodata->wintabDLL
&& videodata->WTInfoA(WTI_DEFSYSCTX, 0, &lc) != 0) {
...
...
@@ -290,6 +291,9 @@ WIN_CreateWindow(_THIS, SDL_Window * window)
}
g_hCtx[window->id] = videodata->WTOpenA(hwnd, &lc, TRUE);
}
#else
//RegisterTouchWindow(hwnd, 0);
#endif
#ifndef _WIN32_WCE
/* has no RawInput */
/* we're telling the window, we want it to report raw input events from mice */
Rid
.
usUsagePage
=
0x01
;
...
...
This diff is collapsed.
Click to expand it.
src/video/win32/wmmsg.h
View file @
cc8ad7be
...
...
@@ -283,7 +283,7 @@ char *wmtab[] = {
"WM_INITMENU"
,
"WM_INITMENUPOPUP"
,
"UNKNOWN (280)"
,
"
UNKNOWN (281)
"
,
"
WM_GESTURE
"
,
"UNKNOWN (282)"
,
"UNKNOWN (283)"
,
"UNKNOWN (284)"
,
...
...
@@ -578,7 +578,7 @@ char *wmtab[] = {
"UNKNOWN (573)"
,
"UNKNOWN (574)"
,
"UNKNOWN (575)"
,
"
UNKNOWN (576)
"
,
"
WM_TOUCH
"
,
"UNKNOWN (577)"
,
"UNKNOWN (578)"
,
"UNKNOWN (579)"
,
...
...
This diff is collapsed.
Click to expand it.
touchTest/touchTest.c
View file @
cc8ad7be
...
...
@@ -55,7 +55,7 @@ void setpix(SDL_Surface *screen, int x, int y, int col)
colour
=
SDL_MapRGB
(
screen
->
format
,
(
col
>>
16
)
&
0xFF
,
(
col
>>
8
)
&
0xFF
,
col
&
0xFF
);
pixmem32
=
(
Uint32
*
)
screen
->
pixels
+
y
*
screen
->
pitch
/
BPP
+
x
;
pixmem32
=
(
Uint32
*
)
screen
->
pixels
+
y
*
screen
->
pitch
/
screen
->
format
->
BytesPerPixel
+
x
;
//TODO : Check this. May cause crash.
*
pixmem32
=
colour
;
}
...
...
@@ -219,6 +219,7 @@ int main(int argc, char* argv[])
}
//And draw
DrawScreen
(
screen
,
h
);
printf
(
"Things
\n
"
);
/*
for(i=0;i<512;i++)
if(keystat[i]) printf("%i\n",i);
...
...
This diff is collapsed.
Click to expand it.
touchTest/touchTest2/touchTest2.ncb
View file @
cc8ad7be
No preview for this file type
This diff is collapsed.
Click to expand it.
touchTest/touchTest2/touchTest2.suo
View file @
cc8ad7be
No preview for this file type
This diff is collapsed.
Click to expand it.
touchTest/touchTest2/touchTest2/SDL.dll
View file @
cc8ad7be
No preview for this file type
This diff is collapsed.
Click to expand it.
touchTest/touchTest2/touchTest2/touchTest2.vcproj
View file @
cc8ad7be
...
...
@@ -57,7 +57,8 @@
/>
<Tool
Name=
"VCLinkerTool"
AdditionalOptions=
"C:\programs\gsoc10\VisualC\SDL\Debug\SDL.lib
C:\programs\gsoc10\VisualC\SDLmain\Debug\SDLmain.lib"
AdditionalOptions=
"C:\programs\gsoc10\VisualC\SDL\Debug\SDL.lib
C:\programs\gsoc10\VisualC\SDLmain\Debug\SDLmain.lib
msvcrt.lib
"
IgnoreAllDefaultLibraries=
"true"
GenerateDebugInformation=
"true"
SubSystem=
"2"
TargetMachine=
"1"
...
...
@@ -179,6 +180,14 @@
Filter=
"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
UniqueIdentifier=
"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
>
<File
RelativePath=
".\SDL.dll"
>
</File>
<File
RelativePath=
".\wmmsg.txt"
>
</File>
</Filter>
</Files>
<Globals>
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment