mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
Wiimote: Added optional status icons for the Wiimote speaker and leds. And a few other small changes.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1455 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -297,7 +297,11 @@ std::string GetUserDirectory()
|
||||
#ifdef _WIN32
|
||||
if (SUCCEEDED(SHGetFolderPath(NULL, CSIDL_COMMON_APPDATA, NULL, 0, path)))
|
||||
{
|
||||
return std::string(path);
|
||||
//return std::string(path);
|
||||
|
||||
/* I dont understand this, I got "E:\Documents and Settings\All Users\Application Data"
|
||||
from this */
|
||||
return std::string("");
|
||||
}
|
||||
return std::string("");
|
||||
#else
|
||||
|
@ -123,6 +123,25 @@ std::string StringFromFormat(const char* format, ...)
|
||||
}
|
||||
|
||||
|
||||
// ===================================================
|
||||
/* For Debugging. Read out an u8 array. */
|
||||
// ----------------
|
||||
std::string ArrayToString(const u8 *data, u32 size, u32 offset, int line_len)
|
||||
{
|
||||
//const u8* _data = (const u8*)data;
|
||||
std::string Temp;
|
||||
for (u32 i = 0; i < size; i++)
|
||||
{
|
||||
char Buffer[128];
|
||||
sprintf(Buffer, "%02x ", data[i + offset]);
|
||||
if((i + 1) % line_len == 0) Temp.append("\n"); // break long lines
|
||||
Temp.append(Buffer);
|
||||
}
|
||||
return Temp;
|
||||
}
|
||||
// ================
|
||||
|
||||
|
||||
void ToStringFromFormat(std::string* out, const char* format, ...)
|
||||
{
|
||||
va_list args;
|
||||
|
@ -32,10 +32,12 @@ void ToStringFromFormat(std::string* out, const char* format, ...);
|
||||
// Expensive!
|
||||
void StringFromFormatV(std::string* out, const char* format, va_list args);
|
||||
|
||||
|
||||
// Cheap!
|
||||
bool CharArrayFromFormatV(char* out, int outsize, const char* format, va_list args);
|
||||
|
||||
// Good
|
||||
std::string ArrayToString(const u8 *data, u32 size, u32 offset = 0, int line_len = 20);
|
||||
|
||||
|
||||
template<size_t Count>
|
||||
inline void CharArrayFromFormat(char (& out)[Count], const char* format, ...)
|
||||
@ -74,4 +76,3 @@ void BuildCompleteFilename(std::string& _CompleteFilename, const std::string& _P
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user