diff --git a/dev/WiiUseJ.dev b/dev/WiiUseJ.dev new file mode 100644 index 0000000..f34b3da --- /dev/null +++ b/dev/WiiUseJ.dev @@ -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 + diff --git a/dev/copy.bat b/dev/copy.bat new file mode 100644 index 0000000..cb938a8 --- /dev/null +++ b/dev/copy.bat @@ -0,0 +1 @@ +copy WiiUseJ.dll ..\..\..\java\native\ \ No newline at end of file diff --git a/dev/copy.mak b/dev/copy.mak new file mode 100644 index 0000000..5459618 --- /dev/null +++ b/dev/copy.mak @@ -0,0 +1,2 @@ +all-after: + copy.bat \ No newline at end of file diff --git a/msvc/WiiUseJ.suo b/msvc/WiiUseJ.suo index 4b26671..739ff49 100644 Binary files a/msvc/WiiUseJ.suo and b/msvc/WiiUseJ.suo differ diff --git a/speaker.h b/speaker.h index 8b8267d..aad8b4e 100644 --- a/speaker.h +++ b/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); \ No newline at end of file +WIIUSE_EXPORT extern void wiiuse_speaker_data(struct wiimote_t* wm, byte* data); diff --git a/wiiusej_WiiUseApi.c b/wiiusej_WiiUseApi.c index 8d28964..aa190ca 100644 --- a/wiiusej_WiiUseApi.c +++ b/wiiusej_WiiUseApi.c @@ -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); -} \ No newline at end of file +}