This commit is contained in:
99
dev/WiiUseJ.dev
Normal file
99
dev/WiiUseJ.dev
Normal file
@@ -0,0 +1,99 @@
|
||||
[Project]
|
||||
FileName=WiiUseJ.dev
|
||||
Name=WiiUseJ
|
||||
UnitCount=5
|
||||
Type=3
|
||||
Ver=1
|
||||
ObjFiles=
|
||||
Includes=..\include;..\include\win32
|
||||
Libs=
|
||||
PrivateResource=
|
||||
ResourceIncludes=
|
||||
MakeIncludes=copy.mak
|
||||
Compiler=-DBUILDING_DLL=1_@@_
|
||||
CppCompiler=-DBUILDING_DLL=1_@@_
|
||||
Linker=--no-export-all-symbols --add-stdcall-alias_@@_../lib/wiiuse.lib_@@_
|
||||
IsCpp=0
|
||||
Icon=
|
||||
ExeOutput=
|
||||
ObjectOutput=
|
||||
OverrideOutput=0
|
||||
OverrideOutputName=WiiUseJ.dll
|
||||
HostApplication=
|
||||
Folders=
|
||||
CommandLine=
|
||||
UseCustomMakefile=0
|
||||
CustomMakefile=
|
||||
IncludeVersionInfo=0
|
||||
SupportXPThemes=0
|
||||
CompilerSet=0
|
||||
CompilerSettings=0000000000000000000000
|
||||
|
||||
[Unit1]
|
||||
FileName=..\speaker.h
|
||||
CompileCpp=0
|
||||
Folder=WiiUseJ
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit2]
|
||||
FileName=..\wiiuse.h
|
||||
CompileCpp=0
|
||||
Folder=WiiUseJ
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit3]
|
||||
FileName=..\wiiusej_Speaker.h
|
||||
CompileCpp=0
|
||||
Folder=WiiUseJ
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit4]
|
||||
FileName=..\wiiusej_WiiUseApi.c
|
||||
CompileCpp=0
|
||||
Folder=WiiUseJ
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit5]
|
||||
FileName=..\wiiusej_WiiUseApi.h
|
||||
CompileCpp=0
|
||||
Folder=WiiUseJ
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[VersionInfo]
|
||||
Major=0
|
||||
Minor=1
|
||||
Release=1
|
||||
Build=1
|
||||
LanguageID=1033
|
||||
CharsetID=1252
|
||||
CompanyName=
|
||||
FileVersion=
|
||||
FileDescription=Developed using the Dev-C++ IDE
|
||||
InternalName=
|
||||
LegalCopyright=
|
||||
LegalTrademarks=
|
||||
OriginalFilename=
|
||||
ProductName=
|
||||
ProductVersion=
|
||||
AutoIncBuildNr=0
|
||||
|
||||
1
dev/copy.bat
Normal file
1
dev/copy.bat
Normal file
@@ -0,0 +1 @@
|
||||
copy WiiUseJ.dll ..\..\..\java\native\
|
||||
2
dev/copy.mak
Normal file
2
dev/copy.mak
Normal file
@@ -0,0 +1,2 @@
|
||||
all-after:
|
||||
copy.bat
|
||||
BIN
msvc/WiiUseJ.suo
BIN
msvc/WiiUseJ.suo
Binary file not shown.
22
speaker.h
22
speaker.h
@@ -2,16 +2,16 @@
|
||||
|
||||
#define WIIMOTE_GET_RUMBLE(wm) (WIIMOTE_IS_SET(wm, WIIMOTE_STATE_RUMBLE) ? 0x01 : 0x00)
|
||||
|
||||
#define WM_CMD_SPEAKER_ENABLE 0x14
|
||||
#define WM_CMD_STREAM_DATA 0x18
|
||||
#define WM_CMD_SPEAKER_MUTE 0x19
|
||||
|
||||
#define WM_CTRL_STATUS_BYTE1_SPEAKER_MUTE 0x04
|
||||
|
||||
#define WM_REG_SPEAKER 0x04a20001
|
||||
|
||||
static byte cfg[9] = {0x00, 0x00, 0x00, 0xdd, 0x40, 0x00, 0x00, 0x01, 0x01};
|
||||
|
||||
#define WM_CMD_SPEAKER_ENABLE 0x14
|
||||
#define WM_CMD_STREAM_DATA 0x18
|
||||
#define WM_CMD_SPEAKER_MUTE 0x19
|
||||
|
||||
#define WM_CTRL_STATUS_BYTE1_SPEAKER_MUTE 0x04
|
||||
|
||||
#define WM_REG_SPEAKER 0x04a20001
|
||||
|
||||
static byte cfg[9] = {0x00, 0x00, 0x00, 0xdd, 0x40, 0x00, 0x00, 0x01, 0x01};
|
||||
|
||||
WIIUSE_EXPORT extern void wiiuse_speaker_enable(struct wiimote_t* wm);
|
||||
WIIUSE_EXPORT extern void wiiuse_speaker_disable(struct wiimote_t* wm);
|
||||
WIIUSE_EXPORT extern void wiiuse_speaker_mute(struct wiimote_t* wm);
|
||||
@@ -20,4 +20,4 @@ WIIUSE_EXPORT extern void wiiuse_speaker_activate(struct wiimote_t* wm);
|
||||
WIIUSE_EXPORT extern void wiiuse_speaker_deactivate(struct wiimote_t* wm);
|
||||
WIIUSE_EXPORT extern void wiiuse_speaker_volume(struct wiimote_t* wm, byte vol);
|
||||
WIIUSE_EXPORT extern void wiiuse_speaker_frequency(struct wiimote_t* wm, unsigned short freq);
|
||||
WIIUSE_EXPORT extern void wiiuse_speaker_data(struct wiimote_t* wm, byte* data);
|
||||
WIIUSE_EXPORT extern void wiiuse_speaker_data(struct wiimote_t* wm, byte* data);
|
||||
|
||||
@@ -747,4 +747,4 @@ JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_streamSpeakerData
|
||||
}
|
||||
wiiuse_speaker_data(wiiuse_get_by_id(wiimotes, nbMaxWiimotes, id), data);
|
||||
(*env)->ReleaseShortArrayElements(env, sArray, jShorts, JNI_FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user