mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 06:39:46 -06:00
Allow C code to use the Dolphin log manager so that Wiiuse text output
can go to the log window like with other subsystems. Remove a Wiiuse dependency on libm from when it was a shared library. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5885 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
2
Externals/WiiUseSrc/Src/SConscript
vendored
2
Externals/WiiUseSrc/Src/SConscript
vendored
@ -19,6 +19,6 @@ if sys.platform == 'linux2' and env['HAVE_BLUEZ']:
|
||||
if sys.platform == 'darwin':
|
||||
files += [ "io_osx.m", ]
|
||||
|
||||
env.StaticLibrary(env['local_libs'] + "wiiuse", files, LIBS='m')
|
||||
env.StaticLibrary(env['local_libs'] + "wiiuse", files)
|
||||
|
||||
env['HAVE_WIIUSE'] = 1
|
||||
|
18
Externals/WiiUseSrc/Src/definitions.h
vendored
18
Externals/WiiUseSrc/Src/definitions.h
vendored
@ -34,11 +34,21 @@
|
||||
#ifndef DEFINITIONS_H_INCLUDED
|
||||
#define DEFINITIONS_H_INCLUDED
|
||||
|
||||
#if 1 // Use Dolphin logging
|
||||
|
||||
#include "Log.h"
|
||||
// NOTICE_LEVEL is more appropriate for the uses of WIIUSE_INFO than INFO_LEVEL
|
||||
// as long as we don't provide adequate GUI feedback for bluetooth events.
|
||||
#define WIIUSE_INFO(...) { GENERIC_LOG(WIIMOTE, NOTICE_LEVEL, __VA_ARGS__) }
|
||||
#define WIIUSE_ERROR(...) { GENERIC_LOG(WIIMOTE, ERROR_LEVEL, __VA_ARGS__) }
|
||||
#define WIIUSE_WARNING(...) { GENERIC_LOG(WIIMOTE, WARNING_LEVEL, __VA_ARGS__) }
|
||||
#define WIIUSE_DEBUG(...) { GENERIC_LOG(WIIMOTE, DEBUG_LEVEL, __VA_ARGS__) }
|
||||
|
||||
#else
|
||||
|
||||
/* this is wiiuse - used to distinguish from third party programs using wiiuse.h */
|
||||
#include "os.h"
|
||||
|
||||
#define WIIMOTE_PI 3.14159265f
|
||||
|
||||
//#define WITH_WIIUSE_DEBUG
|
||||
|
||||
/* Error output macros */
|
||||
@ -65,6 +75,10 @@
|
||||
#define WIIUSE_DEBUG(fmt, ...)
|
||||
#endif
|
||||
|
||||
#endif // Use Dolphin logging
|
||||
|
||||
#define WIIMOTE_PI 3.14159265f
|
||||
|
||||
/* Convert between radians and degrees */
|
||||
#define RAD_TO_DEGREE(r) ((r * 180.0f) / WIIMOTE_PI)
|
||||
#define DEGREE_TO_RAD(d) (d * (WIIMOTE_PI / 180.0f))
|
||||
|
Reference in New Issue
Block a user