diff options
author | Jef <jef@targetspot.com> | 2024-09-24 08:54:57 -0400 |
---|---|---|
committer | Jef <jef@targetspot.com> | 2024-09-24 08:54:57 -0400 |
commit | 20d28e80a5c861a9d5f449ea911ab75b4f37ad0d (patch) | |
tree | 12f17f78986871dd2cfb0a56e5e93b545c1ae0d0 /Src/Winamp/InW.cpp | |
parent | 537bcbc86291b32fc04ae4133ce4d7cac8ebe9a7 (diff) | |
download | winamp-20d28e80a5c861a9d5f449ea911ab75b4f37ad0d.tar.gz |
Initial community commit
Diffstat (limited to 'Src/Winamp/InW.cpp')
-rw-r--r-- | Src/Winamp/InW.cpp | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/Src/Winamp/InW.cpp b/Src/Winamp/InW.cpp new file mode 100644 index 00000000..16cf0d2a --- /dev/null +++ b/Src/Winamp/InW.cpp @@ -0,0 +1,52 @@ +/** (c) Nullsoft, Inc. C O N F I D E N T I A L + ** Filename: + ** Project: + ** Description: Unicode<->ANSI conversion layer for input plugins + ** Author: Ben Allison benski@nullsoft.com + ** Created: + **/ + +#include "main.h" +#include "../nu/AutoCharFn.h" +#include "../nu/ns_wc.h" + + +int InW_IsOurFile(In_Module *mod, const wchar_t *filename) +{ + if(mod) + { + if (mod->version & IN_UNICODE) + return mod->IsOurFile((in_char *)filename); + else + return mod->IsOurFile((in_char *)(char *)AutoCharFn(filename)); + } + return 0; +} + +int InW_Play(In_Module *mod, const wchar_t *filename) +{ + if (mod->version & IN_UNICODE) + return mod->Play((in_char *)filename); + else + return mod->Play((in_char *)(char *)AutoCharFn(filename)); +} + +int InW_InfoBox(In_Module *mod, const wchar_t *filename, HWND parent) +{ + if (mod->version & IN_UNICODE) + return mod->InfoBox((in_char *)filename, parent); + else + return mod->InfoBox((in_char *)(char *)AutoCharFn(filename), parent); +} + +void InW_GetFileInfo(In_Module *mod, const wchar_t *filename, wchar_t *title, int *length) +{ + if (mod->version & IN_UNICODE) + mod->GetFileInfo((in_char *)filename, (in_char *)title, length); + else + { + char tempTitle[GETFILEINFO_TITLE_LENGTH]=""; + mod->GetFileInfo((in_char *)(char *)AutoCharFn(filename), tempTitle, length); + MultiByteToWideCharSZ(CP_ACP, 0, tempTitle, -1, title, GETFILEINFO_TITLE_LENGTH); + } +}
\ No newline at end of file |