Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
e3652428
Commit
e3652428
authored
Nov 26, 2022
by
Rémi Bernon
Committed by
Alexandre Julliard
Nov 28, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
joy.cpl: Move constants and structures to main.c.
parent
ed91d22f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
79 additions
and
77 deletions
+79
-77
joy.rc
dlls/joy.cpl/joy.rc
+1
-1
main.c
dlls/joy.cpl/main.c
+76
-2
resource.h
dlls/joy.cpl/resource.h
+2
-74
No files found.
dlls/joy.cpl/joy.rc
View file @
e3652428
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
*
*
*/
*/
#include "
joy
.h"
#include "
resource
.h"
#pragma makedep po
#pragma makedep po
...
...
dlls/joy.cpl/main.c
View file @
e3652428
...
@@ -28,15 +28,89 @@
...
@@ -28,15 +28,89 @@
#include <winbase.h>
#include <winbase.h>
#include <winuser.h>
#include <winuser.h>
#include <commctrl.h>
#include <commctrl.h>
#include <dinput.h>
#include <cpl.h>
#include <cpl.h>
#include "ole2.h"
#include "ole2.h"
#include "wine/debug.h"
#include "wine/debug.h"
#include "joy.h"
#include "resource.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
joycpl
);
WINE_DEFAULT_DEBUG_CHANNEL
(
joycpl
);
DECLSPEC_HIDDEN
HMODULE
hcpl
;
#define TEST_MAX_BUTTONS 32
#define TEST_MAX_AXES 4
#define TEST_POLL_TIME 100
#define TEST_BUTTON_COL_MAX 8
#define TEST_BUTTON_X 8
#define TEST_BUTTON_Y 122
#define TEST_NEXT_BUTTON_X 30
#define TEST_NEXT_BUTTON_Y 25
#define TEST_BUTTON_SIZE_X 20
#define TEST_BUTTON_SIZE_Y 18
#define TEST_AXIS_X 43
#define TEST_AXIS_Y 60
#define TEST_NEXT_AXIS_X 77
#define TEST_AXIS_SIZE_X 3
#define TEST_AXIS_SIZE_Y 3
#define TEST_AXIS_MIN -25
#define TEST_AXIS_MAX 25
#define FF_AXIS_X 248
#define FF_AXIS_Y 60
#define FF_AXIS_SIZE_X 3
#define FF_AXIS_SIZE_Y 3
#define FF_PLAY_TIME 2*DI_SECONDS
#define FF_PERIOD_TIME FF_PLAY_TIME/4
#define NUM_PROPERTY_PAGES 3
struct
Effect
{
IDirectInputEffect
*
effect
;
DIEFFECT
params
;
DIEFFECTINFOW
info
;
};
struct
Joystick
{
IDirectInputDevice8W
*
device
;
DIDEVICEINSTANCEW
instance
;
int
num_buttons
;
int
num_axes
;
BOOL
forcefeedback
;
BOOL
is_xinput
;
BOOL
has_override
;
int
num_effects
;
int
cur_effect
;
int
chosen_effect
;
struct
Effect
*
effects
;
};
struct
Graphics
{
HWND
hwnd
;
HWND
buttons
[
TEST_MAX_BUTTONS
];
HWND
axes
[
TEST_MAX_AXES
];
HWND
ff_axis
;
};
struct
JoystickData
{
IDirectInput8W
*
di
;
struct
Joystick
*
joysticks
;
int
num_joysticks
;
int
num_ff
;
int
cur_joystick
;
int
chosen_joystick
;
struct
Graphics
graphics
;
BOOL
stop
;
};
static
HMODULE
hcpl
;
/*********************************************************************
/*********************************************************************
* DllMain
* DllMain
...
...
dlls/joy.cpl/
joy
.h
→
dlls/joy.cpl/
resource
.h
View file @
e3652428
...
@@ -22,55 +22,10 @@
...
@@ -22,55 +22,10 @@
#ifndef __WINE_JOYSTICKCPL__
#ifndef __WINE_JOYSTICKCPL__
#define __WINE_JOYSTICKCPL__
#define __WINE_JOYSTICKCPL__
#include <winuser.h>
#include <windef.h>
#include <windef.h>
#include <winbase.h>
#include <winuser.h>
#include <commctrl.h>
#include <commctrl.h>
#include <dinput.h>
extern
HMODULE
hcpl
;
struct
Effect
{
IDirectInputEffect
*
effect
;
DIEFFECT
params
;
DIEFFECTINFOW
info
;
};
struct
Joystick
{
IDirectInputDevice8W
*
device
;
DIDEVICEINSTANCEW
instance
;
int
num_buttons
;
int
num_axes
;
BOOL
forcefeedback
;
BOOL
is_xinput
;
BOOL
has_override
;
int
num_effects
;
int
cur_effect
;
int
chosen_effect
;
struct
Effect
*
effects
;
};
#define TEST_MAX_BUTTONS 32
#define TEST_MAX_AXES 4
struct
Graphics
{
HWND
hwnd
;
HWND
buttons
[
TEST_MAX_BUTTONS
];
HWND
axes
[
TEST_MAX_AXES
];
HWND
ff_axis
;
};
struct
JoystickData
{
IDirectInput8W
*
di
;
struct
Joystick
*
joysticks
;
int
num_joysticks
;
int
num_ff
;
int
cur_joystick
;
int
chosen_joystick
;
struct
Graphics
graphics
;
BOOL
stop
;
};
#define NUM_PROPERTY_PAGES 3
/* strings */
/* strings */
#define IDS_CPL_NAME 1
#define IDS_CPL_NAME 1
...
@@ -102,31 +57,4 @@ struct JoystickData {
...
@@ -102,31 +57,4 @@ struct JoystickData {
#define ICO_MAIN 100
#define ICO_MAIN 100
/* constants */
#define TEST_POLL_TIME 100
#define TEST_BUTTON_COL_MAX 8
#define TEST_BUTTON_X 8
#define TEST_BUTTON_Y 122
#define TEST_NEXT_BUTTON_X 30
#define TEST_NEXT_BUTTON_Y 25
#define TEST_BUTTON_SIZE_X 20
#define TEST_BUTTON_SIZE_Y 18
#define TEST_AXIS_X 43
#define TEST_AXIS_Y 60
#define TEST_NEXT_AXIS_X 77
#define TEST_AXIS_SIZE_X 3
#define TEST_AXIS_SIZE_Y 3
#define TEST_AXIS_MIN -25
#define TEST_AXIS_MAX 25
#define FF_AXIS_X 248
#define FF_AXIS_Y 60
#define FF_AXIS_SIZE_X 3
#define FF_AXIS_SIZE_Y 3
#define FF_PLAY_TIME 2*DI_SECONDS
#define FF_PERIOD_TIME FF_PLAY_TIME/4
#endif
#endif
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