mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2026-04-29 23:41:19 -06:00
Merge branch 'main' into fontlib
This commit is contained in:
commit
aaf1471346
@ -30,7 +30,15 @@ AvPlayerSourceType GetSourceType(std::string_view path) {
|
||||
}
|
||||
|
||||
// schema://server.domain/path/to/file.ext/and/beyond -> .ext/and/beyond
|
||||
auto ext = name.substr(name.rfind('.'));
|
||||
|
||||
// Find extension dot
|
||||
auto dot_pos = name.rfind('.');
|
||||
if (dot_pos == std::string_view::npos) {
|
||||
return AvPlayerSourceType::Unknown;
|
||||
}
|
||||
|
||||
// Extract extension (".ext/anything" or ".ext")
|
||||
auto ext = name.substr(dot_pos);
|
||||
if (ext.empty()) {
|
||||
return AvPlayerSourceType::Unknown;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user