mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-02 12:03:38 +00:00
joy.cpl: Move constants and structures to main.c.
This commit is contained in:
parent
ed91d22fe4
commit
e365242892
|
@ -19,7 +19,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#include "joy.h"
|
||||
#include "resource.h"
|
||||
|
||||
#pragma makedep po
|
||||
|
||||
|
|
|
@ -28,15 +28,89 @@
|
|||
#include <winbase.h>
|
||||
#include <winuser.h>
|
||||
#include <commctrl.h>
|
||||
#include <dinput.h>
|
||||
#include <cpl.h>
|
||||
#include "ole2.h"
|
||||
|
||||
#include "wine/debug.h"
|
||||
#include "joy.h"
|
||||
|
||||
#include "resource.h"
|
||||
|
||||
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
|
||||
|
|
|
@ -22,55 +22,10 @@
|
|||
#ifndef __WINE_JOYSTICKCPL__
|
||||
#define __WINE_JOYSTICKCPL__
|
||||
|
||||
#include <winuser.h>
|
||||
#include <windef.h>
|
||||
#include <winbase.h>
|
||||
#include <winuser.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 */
|
||||
#define IDS_CPL_NAME 1
|
||||
|
@ -102,31 +57,4 @@ struct JoystickData {
|
|||
|
||||
#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
|
Loading…
Reference in a new issue