Mercurial > repos > blastem
diff util.h @ 1438:e2bd03ed3190
Allow reloading current ROM with a hotkey (default F5) and allow locking on a cartridge via menu
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Wed, 23 Aug 2017 21:18:17 -0700 |
parents | 5ceb316c479a |
children | d82af64c94d2 |
line wrap: on
line diff
--- a/util.h Mon Aug 21 23:49:56 2017 -0700 +++ b/util.h Wed Aug 23 21:18:17 2017 -0700 @@ -42,6 +42,8 @@ char * basename_no_extension(char *path); //Returns the extension from a path or NULL if there is no extension char *path_extension(char *path); +//Returns the directory portion of a path or NULL if there is no directory part +char *path_dirname(char *path); //Gets the smallest power of two that is >= a certain value, won't work for values > 0x80000000 uint32_t nearest_pow2(uint32_t val); //Should be called by main with the value of argv[0] for use by get_exe_dir