This commit is contained in:
twinaphex 2015-07-02 00:56:51 +02:00
parent 2a5238706d
commit 0c6809952d
3 changed files with 9 additions and 7 deletions

View File

@ -16,13 +16,13 @@
*/
#include <file/file_extract.h>
#include <rhash.h>
#include "file_ext.h"
#include "dir_list_special.h"
#include "database_info.h"
#include "file_ops.h"
#include "msg_hash.h"
#include "general.h"
#include "runloop.h"
@ -117,7 +117,7 @@ int database_info_build_query(char *s, size_t len,
database_info_build_query_add_bracket_open(s, len);
value = djb2_calculate(label);
value = msg_hash_calculate(label);
switch (value)
{
@ -247,7 +247,7 @@ static int database_cursor_iterate(libretrodb_cursor_t *cur,
continue;
str = key->val.string.buff;
value = djb2_calculate(str);
value = msg_hash_calculate(str);
switch (value)
{

View File

@ -148,9 +148,11 @@ patch_error_t bps_apply_patch(
case SOURCE_COPY:
case TARGET_COPY:
{
int offset = bps_decode(&bps);
int offset = bps_decode(&bps);
bool negative = offset & 1;
offset >>= 1;
if (negative)
offset = -offset;
@ -257,7 +259,8 @@ static uint64_t ups_decode(struct ups_data *data)
while (true)
{
uint8_t x = ups_patch_read(data);
offset += (x & 0x7f) * shift;
offset += (x & 0x7f) * shift;
if (x & 0x80)
break;
shift <<= 7;

View File

@ -21,7 +21,6 @@
#include <retro_log.h>
#include <compat/strl.h>
#include <rhash.h>
#include "configuration.h"
#include "dynamic.h"
@ -400,7 +399,7 @@ static void check_shader_dir(bool pressed_next, bool pressed_prev)
shader = global->shader_dir.list->elems[global->shader_dir.ptr].data;
ext = path_get_extension(shader);
ext_hash = djb2_calculate(ext);
ext_hash = msg_hash_calculate(ext);
switch (ext_hash)
{