mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
oops
This commit is contained in:
parent
d884f24998
commit
3c15605cf0
@ -567,16 +567,10 @@ get_registry_entry(HKEY base, const char* subKeyName,
|
|||||||
void MilesAudioManager::
|
void MilesAudioManager::
|
||||||
get_gm_file_path(string& result) {
|
get_gm_file_path(string& result) {
|
||||||
if(!get_registry_entry(HKEY_LOCAL_MACHINE,"SOFTWARE\\Microsoft\\DirectMusic", "GMFilePath", result)) {
|
if(!get_registry_entry(HKEY_LOCAL_MACHINE,"SOFTWARE\\Microsoft\\DirectMusic", "GMFilePath", result)) {
|
||||||
const char *pDefaultGMLoc="%windir%\\system32\\drivers\\gm.dls";
|
char sysdir[MAX_PATH+1];
|
||||||
// Find the size of the expanded string:
|
GetSystemDirectory(sysdir,MAX_PATH+1);
|
||||||
DWORD destSize=ExpandEnvironmentStrings(pDefaultGMLoc, 0, 0);
|
result = sysdir;
|
||||||
// Get a destination buffer of that size:
|
result.append("\\drivers\\gm.dls");
|
||||||
char* dest = new char[destSize];
|
|
||||||
// Do the expansion:
|
|
||||||
ExpandEnvironmentStrings(pDefaultGMLoc, dest, destSize);
|
|
||||||
// Propagate the result:
|
|
||||||
result=dest;
|
|
||||||
delete [] dest;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
audio_debug("MilesAudioManager::get_gm_file_path() result out=\""<<result<<"\"");
|
audio_debug("MilesAudioManager::get_gm_file_path() result out=\""<<result<<"\"");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user