comparison menu.c @ 1524:b96f9fae757f nuklear_ui

Fix Windows build, added Windows default_font_path implementation
author Michael Pavone <pavone@retrodev.com>
date Wed, 07 Feb 2018 00:07:12 -0800
parents 369da70ee2c2
children 3629366616da
comparison
equal deleted inserted replaced
1523:c416ace65ff1 1524:b96f9fae757f
119 *dest = 0; 119 *dest = 0;
120 dst += 2; 120 dst += 2;
121 } 121 }
122 return dst; 122 return dst;
123 } 123 }
124 124 #include <windows.h>
125 void * menu_write_w(uint32_t address, void * context, uint16_t value) 125 void * menu_write_w(uint32_t address, void * context, uint16_t value)
126 { 126 {
127 m68k_context *m68k = context; 127 m68k_context *m68k = context;
128 genesis_context *gen = m68k->system; 128 genesis_context *gen = m68k->system;
129 menu_context *menu = get_menu(gen); 129 menu_context *menu = get_menu(gen);
130 if (menu->state) { 130 if (menu->state) {
131 uint32_t dst = menu->latch << 16 | value; 131 uint32_t dst = menu->latch << 16 | value;
132 switch (address >> 2) 132 switch (address >> 2)
133 { 133 {
134 case 0: { 134 case 0: {
135 #ifdef _WIN32 135 #if _WIN32
136 //handle virtual "drives" directory 136 //handle virtual "drives" directory
137 if (menu->curpath[0] == PATH_SEP[0]) { 137 if (menu->curpath[0] == PATH_SEP[0]) {
138 char drivestrings[4096]; 138 char drivestrings[4096];
139 if (sizeof(drivestrings) >= GetLogicalDriveStrings(sizeof(drivestrings), drivestrings)) { 139 if (sizeof(drivestrings) >= GetLogicalDriveStrings(sizeof(drivestrings), drivestrings)) {
140 for (char *cur = drivestrings; *cur; cur += strlen(cur) + 1) 140 for (char *cur = drivestrings; *cur; cur += strlen(cur) + 1)