This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
uint8* dest = malloc(width * height * 4); | |
short* src = imgData; | |
for (int i = 0; i < width * height; ++i) { | |
short x = *src++; | |
*dest++ = (x >> 8) & 0xFF; | |
*dest++ = x & 0xFF; | |
*dest++ = 0; | |
*dest++ = 0; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/core/hle/service/fs_user.cpp b/src/core/hle/service/fs_user.cpp | |
index 0ff9570..0e83a18 100644 | |
--- a/src/core/hle/service/fs_user.cpp | |
+++ b/src/core/hle/service/fs_user.cpp | |
@@ -23,6 +23,23 @@ enum class LowPathType : u32 { | |
Wchar = 4 | |
}; | |
+u64 FS_Path::as_empty() { | |
+ return 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const TEST_DATA : &'static str = "Device: ID=1; Fw=16071801; Evt=2; Alarms: CoilRevesed=OFF; Power: Active=1753W; Reactive=279var; Appearent=403VA; Line: Current=7.35900021; Voltage=230.08V; Phase=-43,841rad; Peaks: 7.33199978;7.311999799999999;7.53000021;7.48400021;7.54300022;7.62900019;7.36499977;7.28599977;7.37200022;7.31899977; FFT Re: 9748;46;303;33;52;19;19;39;-455; FFT Img: 2712;6;-792;-59;1386;-19;963;33;462; UTC Time: 2016-10-4 16:47:50; hz: 49.87; WiFi Strength: -62; Dummy: 20"; | |
fn partition(s: &str) -> (&str, Option<char>, &str) { | |
const TOKEN_SEPARATORS : &'static [char] = &[':', '=', ';']; | |
let idx = s.find(TOKEN_SEPARATORS).unwrap_or(s.len()); | |
let (head, tail) = s.split_at(idx); | |
let mut tail_it = tail.chars(); | |
let separator = tail_it.next(); | |
(head, separator, tail_it.as_str()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const TEST_DATA : &'static str = "Device: ID=1; Fw=16071801; Evt=2; Alarms: CoilRevesed=OFF; Power: Active=1753W; Reactive=279var; Appearent=403VA; Line: Current=7.35900021; Voltage=230.08V; Phase=-43,841rad; Peaks: 7.33199978;7.311999799999999;7.53000021;7.48400021;7.54300022;7.62900019;7.36499977;7.28599977;7.37200022;7.31899977; FFT Re: 9748;46;303;33;52;19;19;39;-455; FFT Img: 2712;6;-792;-59;1386;-19;963;33;462; UTC Time: 2016-10-4 16:47:50; hz: 49.87; WiFi Strength: -62; Dummy: 20"; | |
fn partition(s: &str) -> (&str, Option<char>, &str) { | |
const TOKEN_SEPARATORS : &'static [char] = &[':', '=', ';']; | |
let idx = s.find(TOKEN_SEPARATORS).unwrap_or(s.len()); | |
let (head, tail) = s.split_at(idx); | |
let mut tail_it = tail.chars(); | |
let separator = tail_it.next(); | |
(head, separator, tail_it.as_str()) |