OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2009, Google Inc. | 2 * Copyright 2009, Google Inc. |
3 * All rights reserved. | 3 * All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 | 208 |
209 return true; | 209 return true; |
210 } | 210 } |
211 | 211 |
212 bool D3D9SoftwareInstallCheck(std::string* error) { | 212 bool D3D9SoftwareInstallCheck(std::string* error) { |
213 scoped_array<TCHAR> dll_path(new TCHAR[_MAX_PATH]); | 213 scoped_array<TCHAR> dll_path(new TCHAR[_MAX_PATH]); |
214 if (!GetModuleDirectory(dll_path.get(), error)) { | 214 if (!GetModuleDirectory(dll_path.get(), error)) { |
215 return false; | 215 return false; |
216 } | 216 } |
217 | 217 |
218 if (!PathAppend(dll_path.get(), _T("O3DExtras\\swrend\\d3d9.dll"))) { | 218 if (!PathAppend(dll_path.get(), _T("O3DExtras\\swiftshader_d3d9.dll"))) { |
219 *error = "Failed to compute new plugin location."; | 219 *error = "Failed to compute new software renderer location."; |
220 return false; | 220 return false; |
221 } | 221 } |
222 | 222 |
223 g_d3d9_software = LoadLibrary(dll_path.get()); | 223 g_d3d9_software = LoadLibrary(dll_path.get()); |
224 if (!g_d3d9_software) { | 224 if (!g_d3d9_software) { |
225 *error = "Failed to load software renderer."; | 225 *error = "Failed to load software renderer."; |
226 return false; | 226 return false; |
227 } | 227 } |
228 | 228 |
229 Direct3DCreate9Software = reinterpret_cast<Direct3DCreate9_Ptr>( | 229 Direct3DCreate9Software = reinterpret_cast<Direct3DCreate9_Ptr>( |
(...skipping 16 matching lines...) Expand all Loading... |
246 return false; | 246 return false; |
247 } | 247 } |
248 | 248 |
249 // Failure to find the software renderer is not an error at this point. | 249 // Failure to find the software renderer is not an error at this point. |
250 D3D9SoftwareInstallCheck(error); | 250 D3D9SoftwareInstallCheck(error); |
251 | 251 |
252 return true; | 252 return true; |
253 } | 253 } |
254 | 254 |
255 } // namespace o3d | 255 } // namespace o3d |
OLD | NEW |