diff options
| author | 2016-04-16 15:24:39 +0100 | |
|---|---|---|
| committer | 2016-05-28 13:52:48 -0500 | |
| commit | 59b268de35d7ed9db55e2aadc449e945e896b937 (patch) | |
| tree | ef81fe12835b6bc33cd1e36eda7f9119792fedfe /src | |
| parent | GSP_GPU: Remove use of Memory::GetPointer (diff) | |
| download | yuzu-59b268de35d7ed9db55e2aadc449e945e896b937.tar.gz yuzu-59b268de35d7ed9db55e2aadc449e945e896b937.tar.xz yuzu-59b268de35d7ed9db55e2aadc449e945e896b937.zip | |
SSL_C: Remove use of Memory::GetPointer
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/service/ssl_c.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/core/hle/service/ssl_c.cpp b/src/core/hle/service/ssl_c.cpp index 14a4e98ec..a8aff1abf 100644 --- a/src/core/hle/service/ssl_c.cpp +++ b/src/core/hle/service/ssl_c.cpp | |||
| @@ -31,7 +31,6 @@ static void GenerateRandomData(Service::Interface* self) { | |||
| 31 | 31 | ||
| 32 | u32 size = cmd_buff[1]; | 32 | u32 size = cmd_buff[1]; |
| 33 | VAddr address = cmd_buff[3]; | 33 | VAddr address = cmd_buff[3]; |
| 34 | u8* output_buff = Memory::GetPointer(address); | ||
| 35 | 34 | ||
| 36 | // Fill the output buffer with random data. | 35 | // Fill the output buffer with random data. |
| 37 | u32 data = 0; | 36 | u32 data = 0; |
| @@ -44,13 +43,13 @@ static void GenerateRandomData(Service::Interface* self) { | |||
| 44 | 43 | ||
| 45 | if (size > 4) { | 44 | if (size > 4) { |
| 46 | // Use up the entire 4 bytes of the random data for as long as possible | 45 | // Use up the entire 4 bytes of the random data for as long as possible |
| 47 | *(u32*)(output_buff + i) = data; | 46 | Memory::Write32(address + i, data); |
| 48 | i += 4; | 47 | i += 4; |
| 49 | } else if (size == 2) { | 48 | } else if (size == 2) { |
| 50 | *(u16*)(output_buff + i) = (u16)(data & 0xffff); | 49 | Memory::Write16(address + i, static_cast<u16>(data & 0xffff)); |
| 51 | i += 2; | 50 | i += 2; |
| 52 | } else { | 51 | } else { |
| 53 | *(u8*)(output_buff + i) = (u8)(data & 0xff); | 52 | Memory::Write8(address + i, static_cast<u8>(data & 0xff)); |
| 54 | i++; | 53 | i++; |
| 55 | } | 54 | } |
| 56 | } | 55 | } |